Posted By

noah on 05/31/09


undo history git commit

Versions (?)

git undo last commit

 / Published in: Bash


To add an undo command to Git, use

      git config --global alias.undo 'reset --soft HEAD^'

then just type git undo to get rid of the last commit.

Type git help reset for the rest of the documentation.

  1. git reset --soft HEAD^

Report this snippet  

You need to login to post a comment.