Save changes to stash git stash save --keep-index Discard stash git stash drop Apply stash git stash pop Discard changes done only in one file git checkout path/to/file/to/revert Discard changes done in all files git checkout -- .