Use

git revert HEAD

This will create a patch that reverts the last commit and commit that patch as a new commit.

If you want to revert a specific earlier version, use

git revert <revision>

see also: http://schacon.github.com/git/git-revert.html