$ git commit -m "Something terribly misguided" (1) $ git reset --soft HEAD~ (2) << edit files as necessary >> (3) $ git add ... (4) $ git commit -c ORIG_HEAD (5)
转自: http://stackoverflow.com/questions/927358/how-do-you-undo-the-last-commit
转载于:https://www.cnblogs.com/pinganzi/p/5384630.html