Skip to content

Instantly share code, notes, and snippets.

@olbartek
Created July 6, 2017 20:34
Show Gist options
  • Save olbartek/362d8938da4efa40be9c2e45c07fde35 to your computer and use it in GitHub Desktop.
Save olbartek/362d8938da4efa40be9c2e45c07fde35 to your computer and use it in GitHub Desktop.
GIt reflog simple usage
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