Created
July 6, 2017 20:34
-
-
Save olbartek/362d8938da4efa40be9c2e45c07fde35 to your computer and use it in GitHub Desktop.
GIt reflog simple usage
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
Have you accidentially made a hard reset to some of your commits? | |
git reset --hard HEAD~1 | |
You can simply check git reflog, | |
because Every time the current HEAD gets updated a new entry will be added to the reflog. | |
git reflog | |
Find the desired commit and make a hard reset to it. | |
git reset --hard <commit> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment