Skip to content

Instantly share code, notes, and snippets.

@mulder
Created November 25, 2009 19:47
Show Gist options
  • Save mulder/242977 to your computer and use it in GitHub Desktop.
Save mulder/242977 to your computer and use it in GitHub Desktop.
Help me I git reset --hard
It is possible to recover it if Git hasn't garbage collected yet.
Get an overview of dangling commits with fsck:
$ git fsck --lost-found
dangling commit b72e67a9bb3f1fc1b64528bcce031af4f0d6fcbf
Recover the dangling commit with rebase:
$ git rebase b72e67a9bb3f1fc1b64528bcce031af4f0d6fcbf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment