Skip to content

Instantly share code, notes, and snippets.

@TravisMullen
Created August 11, 2017 01:31
Show Gist options
  • Save TravisMullen/3df8ef7798b7cbf6a6c255f5b0678a87 to your computer and use it in GitHub Desktop.
Save TravisMullen/3df8ef7798b7cbf6a6c255f5b0678a87 to your computer and use it in GitHub Desktop.
PRESERVE the files before the last 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