Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@Chrispassold
Last active October 26, 2018 17:57
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 Chrispassold/7a65996ef8e3fc38c684a2b973ef7003 to your computer and use it in GitHub Desktop.
Save Chrispassold/7a65996ef8e3fc38c684a2b973ef7003 to your computer and use it in GitHub Desktop.
https://stackoverflow.com/a/42903805
Delete the most recent commit, keeping the work you've done:
git reset --soft HEAD~1
Delete the most recent commit, destroying the work you've done:
git reset --hard HEAD~1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment