So, I recently migrated our git servers and during the migration I think some objects got left off in the old repo. This was a couple of weeks ago and today I tried to run git gc --aggressive on the repo in the new server but it failed with the below error:
error: Could not read a23bacz
fatal: bad tree object a23bacz
error: failed to run repack
Then, I went to my old repo and tried to grab that object by following: Git: fetch a specific object from a remote
i.e. I ran git cat-file tree a23bacz > 3b... and then I copied that object to the repo on my new server. However now, I get the below error:
fatal: loose object a23bacz (stored in
./objects/a2/3bacz) is corrupt
I also ran git fsck:
git fsck
broken link from tree 1a4da9z
to tree a23bacz
Is there any way to fix this?