Skip to content

Instantly share code, notes, and snippets.

@antespi
Last active December 26, 2015 07:19
Show Gist options
  • 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
Discard changes done only in one file
=====================================
# git checkout path/to/file/to/revert
Discard changes done in all files
=================================
# git checkout -- .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment