What can I do with Git corruption due to a missing object?

前端 未结 3 1751
梦毁少年i
梦毁少年i 2021-01-04 12:05

I just went to clone a repository on another remote server and ran into an issue trying to do so:

git clone git@codebasehq.com:blah/blah/docs.git
Cloning int         


        
3条回答
  •  醉酒成梦
    2021-01-04 12:18

    If it's only one single file and it's not packed yet, you should be able to find it in .git/objects/14/f87a739828e4d489b0310a51e057b30333926e in your local repository. You can copy this files to the corresponding directory in the repository on your server.

    If it is packed, you should be able to unpack it using git unpack-objects on one of the pack files in .git/objects/pack/. After that, copying to the server works as described above.

提交回复
热议问题