Undoing the last git commit

Really simple:

git revert HEAD

Source: Git Book – Undoing in Git