Undo last commit: Keep changes in staged git reset --soft HEAD~1 Remove changes completely git reset --hard HEAD~1