Posted on January 7, 2014January 7, 2014 by CiprianGit delete last commit If you have not pushed a commit use the following command to delete last commit. Git delete last commit git reset --soft HEAD~1