Written by Sean Behan on Sun Jun 17th 2012

Remove your last commit (if you haven't pushed yet)

git reset --hard HEAD~1

To see changes that have been committed and their position in HEAD

git reflog 

And to undo your previous reset and advance the cursor to the reference immediately behind the current state

git reset --hard HEAD@{1}

If you have already pushed you can

git revert HEAD

which will reverse your last commit by creating a new commit

Tagged with..
#commit #Git #hard #head #reset #source control #workflow #Git

Just finishing up brewing up some fresh ground comments...