I\'m running git 1.6.4.2. Garbage collection is failing saying \"error: unable to find
\".
I\'ve managed to determine that the missing obje
I had the same problem (missing blob) and the solution with
git reflog expire --expire=now --all
didn't do the trick. I found my solution here : https://git.wiki.kernel.org/index.php/GitFaq#How_to_fix_a_broken_repository.3F
This simple line
git hash-object -w <file>
Fixed the missing blob.
Hope this helps.
After a bit more digging it turns out that my question is answered here: How to delete a blob from git repo - git prune
wasn't pruning the stuff I'd wound back because the reflog was still referring to it. Running
git reflog expire --expire=now --all
fixed that. Also, the referenced post gives a mechanism for running git lstree
on every commit to find the referenced blob.