Skip to content

Instantly share code, notes, and snippets.

@jcpst
Created February 17, 2015 16:07
Show Gist options
  • Save jcpst/69f4e2e8729e24aaa944 to your computer and use it in GitHub Desktop.
Save jcpst/69f4e2e8729e24aaa944 to your computer and use it in GitHub Desktop.
bad local commit

from here

Whoops, didn't want to commit that...

Leave tracked files untouched (use --hard to remove all tracked changes):

git reset --soft HEAD~1

If you already pushed, add a new commit that reverts the last commit:

git revert HEAD

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