Undo last commit $ git reset HEAD~1 Same as above, but also leave the files staged $ git reset --soft HEAD~1