I am launching a development team with a corrupt git repository since we have not had time to fix it yet. I found that some things keep the ball in motion, which may help.
First you have one machine with [gc] auto = 0 and unzip all the repo objects
Secondly, git 1.8 seems to handle problems better than 1.7, so you have a machine with git 1.8 with access to file systems containing the source.
Thirdly, always git fetch from machine 1.8, and then git pull from machine 1.7
Fourth, when even 1.8 cannot pull git, you need to run git fsck | grep missing and manually copy the objects from the unpacked repo to the repository of objects on the damaged repo (where 0c0ef24 is missing ... will be in / 0c / 0ef24 objects ...)
Itβs a mystery for me why git fetch / pull doesnβt understand that they are not in the local git and get them from the source, but it seems to manually fetch it, after which git is happy again. After you manually installed the git repo run git gc operation (but not on the unpacked computer or you will need to find the missing objects before you can manually fix the situation again, which is annoying)
Which would be very convenient - this is a command to tell git to get a specific object from the source, but I think it would be even better if he did this without having to ask :-)
Hope this helps.
source share