Git: Undo a commit

For local commits that haven't yet been pushed:

git reset --soft HEAD^

For pushed commits run the above command, make your changes, then:

git push -f    
adrexia