Posted By

noah on 05/31/09


Tagged

undo history git commit


Versions (?)

git undo last commit


 / Published in: Bash
 

URL: http://www.kernel.org/pub/software/scm/git/docs/v1.0.13/git-reset.html

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.