Skip to content

Instantly share code, notes, and snippets.

@mungomash
Created January 7, 2012 19:15
Show Gist options
  • Save mungomash/1575696 to your computer and use it in GitHub Desktop.
Save mungomash/1575696 to your computer and use it in GitHub Desktop.
Git cheat sheet
# undo a commit (file changes and index changes preserved)
git reset --soft HEAD^
# undo a commit (file changes preserved, index changes are rolled back)
git reset HEAD^
# undo a commit (file changes and index changes rolled back)
git reset --hard HEAD^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment