Hacker News new | ask | show | jobs
by herge 4396 days ago
git reset HEAD^

Add --hard, --mixed, --soft for different effects. This command itself can be undone by going through git reflog and finding the appropriate commit.

1 comments

To add to this, git-reset enables much more than simply 'undoing' the last commit, so it could not be adequately replaced with `git commit --undo`.