DEV Community

Discussion on: How to undo the last commit

Collapse
 
dfockler profile image
Dan Fockler

If you just have a local commit you can also use the git reflog indexes to move back to a point in history even moving back from doing merges and pulls. Something like git reset --hard HEAD@{<reflog index number>}

Collapse
 
jvarness profile image
Jake Varness

Reflog is life