Created
April 12, 2014 22:23
-
-
Save jvanja/10559782 to your computer and use it in GitHub Desktop.
Git undo commit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# undo commit and REVERT the files to the last HEAD | |
git reset --hard HEAD~1 | |
# undo commit but PRESERVE the files before the last commit | |
git reset HEAD~1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment