Git: Undo Commit
Reset to last commit, but keep your changes
# undo last commit, but keep your changes git reset --soft HEAD^ # undo add git reset .
Reset to last commit, throw away all your changes
git reset --hard HEAD^
# undo last commit, but keep your changes git reset --soft HEAD^ # undo add git reset .
git reset --hard HEAD^