Skip to content

Instantly share code, notes, and snippets.

@dynoChris
Last active February 14, 2019 00:38
Show Gist options
  • Save dynoChris/3fdf53bfc6675e00867b145987bccb6a to your computer and use it in GitHub Desktop.
Save dynoChris/3fdf53bfc6675e00867b145987bccb6a to your computer and use it in GitHub Desktop.
How to cancel git commit?
git reset HEAD~1
//On Unix based systems you can use HEAD^ which is equal to HEAD~1. On Windows HEAD^ will not work because ^ signals a line continuation. So your command prompt will just ask you More?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment