Git - how to recover from a missing blob

后端 未结 2 1070
野的像风
野的像风 2020-12-15 08:28

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

2条回答
  •  独厮守ぢ
    2020-12-15 09:04

    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.

提交回复
热议问题