git magic: undo/redo commits

14 Jul
2009

Needed some git magic today. Still feelin like Harry Potter VS Lord Voldemort (psssst. Hard fight, but won =)

Remember (to myself)

git reset --soft HEAD^   Undo commit & keep changes in the working tree
git reset --hard HEAD^   Reset the working tree to the last commit

Get the git magic! (or the pdf)

Theres also the Git Community Book

Related posts:

  1. git and cvs turnaround ‘guerilla style’

Comment Form

top

Switch to our mobile site