Skip to content

Instantly share code, notes, and snippets.

@samredai
Created January 16, 2020 14:40
Show Gist options
  • Save samredai/8621032b526a7531558ea3609a828a19 to your computer and use it in GitHub Desktop.
Save samredai/8621032b526a7531558ea3609a828a19 to your computer and use it in GitHub Desktop.
Git: Recover Uncommitted Files Removed From git rm
git prune -n
# Returns a list of hashes
git cat-file -p HASH1 > recovered_file1.txt
git cat-file -p HASH2 > recovered_file2.txt
git cat-file -p HASH3 > recovered_file3.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment