Skip to content

Instantly share code, notes, and snippets.

Jay Pfaffman pfaffman

Block or report user

Report or block pfaffman

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@tkersey
tkersey / Undo a commit and redo
Created Oct 8, 2010
Git: undo a commit and redo
View Undo a commit and redo
http://stackoverflow.com/questions/927358/git-undo-last-commit
Undo a commit and redo
$ git commit ...
$ git reset --soft HEAD^ (1)
$ edit (2)
$ git commit -a -c ORIG_HEAD (3)
This is most often done when you remembered what you just committed is incomplete, or you misspelled your commit message, or both. Leaves working tree as it was before "reset".
You can’t perform that action at this time.