Recover dangling blobs in Git

You can use git show fce4a77b63b25abbc010859b4037589983820329to see the content (or git show fce4a > somefile to dump it to a file).

File names are lost (unless there are also dangling trees or other sources of information like command history in .bash_history).

If you can see (with git ls-tree) your root tree, you can create a commit with it using git commit-tree command or some git checkout e48751c3b37a9cab692133202bbb933241f73f69 -- . to retrieve files.

Leave a Comment