git-undo
[<commitcount>]
Removes the latest commits.
<commitcount>
Number of commits to remove. Defaults to 1, thus remove the latest commit.
Removes the latest commit.
$ git undo
Remove the latest 3 commits:
$ git undo 3
Written by Kenneth Reitz <me@kennethreitz.com>