Skip to content

Instantly share code, notes, and snippets.

@jvanja
Created April 12, 2014 22:23
Show Gist options
  • Save jvanja/10559782 to your computer and use it in GitHub Desktop.
Save jvanja/10559782 to your computer and use it in GitHub Desktop.
Git undo commit
# 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