Created
March 21, 2017 11:37
-
-
Save greew/8551d1d7444ed56a5dc50e3f7c92069d to your computer and use it in GitHub Desktop.
Git - Recover lost commit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get a list of where HEAD has been recently | |
git reflog | |
# Check the sha1 where you think the correct code might be | |
git show <sha1> | |
# When you've found it, merge it back in | |
git merge <sha1> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment