how to recover last commit after reset --hard
Recover that lost commit
In your repository, run git reflog (If you know what branch the commit was in, use git reflog <branch>)
Look for the commit message that went missing
Find the associated SHA, and run git show <sha>
View your missing code in all its glory
Use git cherry-pick <sha> to get that lost commit into a new branch
Comments
Post a Comment