Skip to content

Instantly share code, notes, and snippets.

@watbulb
Created November 22, 2020 04:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save watbulb/0b3ba96d722c619855315c488327134a to your computer and use it in GitHub Desktop.
Save watbulb/0b3ba96d722c619855315c488327134a to your computer and use it in GitHub Desktop.
recovering uncommitted changes from a git reset --hard (godbless)
for blob in $(git fsck --lost-found | cut -d' ' -f3); do
git cat-file -p $blob > $blob.txt
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment