I was in the middle of a git rebase
, and got an error about git being unable to read cc95d5463f90fd78c4382948418b6ae5ddfb0a2a
I investigated, and found that that blob was referenced in four commits. I unpacked one of the commits and grepped the blob, and the output pointed me to the file in my repo. I have replaced the output filename with brokenfile
, and dc77f57d
is a commit that referenced the blob:
$ git ls-tree -r dc77f57d | grep cc95d5463f90fd78c4382948418b6ae5ddfb0a2a
100644 blob cc95d5463f90fd78c4382948418b6ae5ddfb0a2a brokenfile
git fsck
also reports:
broken link from tree 4e6de279c5d48acc16457bf35cea9702c892ddd1
to blob cc95d5463f90fd78c4382948418b6ae5ddfb0a2a
...
missing blob cc95d5463f90fd78c4382948418b6ae5ddfb0a2a
I was then going to re-create the blob for the file, but the file's hash no longer matches the blob:
$ git hash-object brokenfile
695d542ba36a58012c928e999b3b5f36bbb8013d
Is there a way to recover from this state? The blob doesn't exist at all in .git/objects/, which leads me to believe it was somehow deleted during the rebase.
Thank you.