Skip to content

Instantly share code, notes, and snippets.

@robdecker
Last active October 19, 2019 20:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robdecker/b12b8453b4c6803441a8 to your computer and use it in GitHub Desktop.
Save robdecker/b12b8453b4c6803441a8 to your computer and use it in GitHub Desktop.
[Common Git commands] #sh #git

Undo last commit

$ git reset HEAD~1

Same as above, but also leave the files staged

$ git reset --soft HEAD~1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment