Skip to content

Instantly share code, notes, and snippets.

@miss-invincible
Last active April 22, 2017 09:24
Show Gist options
  • Save miss-invincible/7b4a91ba9446d6dff12cd54f0d881dd4 to your computer and use it in GitHub Desktop.
Save miss-invincible/7b4a91ba9446d6dff12cd54f0d881dd4 to your computer and use it in GitHub Desktop.
This file contains method to uncommit files and message and simply uncommit a message

to uncommit all the stuff: both the message and added files:
git reset HEAD~

in this case you would have to add files and add message before making commit.(changed and added files(staged) are unstaged).

if just just want to edit message of the commit then use soft HEAD:
git reset --soft HEAD~

to reset to a particlar commit :
git reset --hard 4a155e5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment