Skip to content

Instantly share code, notes, and snippets.

@antespi
Last active December 26, 2015 07:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save antespi/7114888 to your computer and use it in GitHub Desktop.
Save antespi/7114888 to your computer and use it in GitHub Desktop.
Discard changes in working tree

Save changes to stash

git stash save --keep-index

Discard stash

git stash drop

Apply stash

git stash pop

Discard changes

One file

git checkout path/to/file/to/revert

All files

git checkout -- .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment