How do I deal with corrupted Git object files?

后端 未结 4 1431
不知归路
不知归路 2020-12-05 01:29

I did a Git pull when I was near my quota, and as a result (so I think), got a corrupted file:

$ git pull
walk dffbfa18916a9db95ef8fafc6d7d769c29a445aa
fata         


        
4条回答
  •  -上瘾入骨i
    2020-12-05 02:19

    You can use "find" for remove all files in the /objects directory with 0 in size with the command:

    find .git/objects/ -size 0 -delete
    

    Backup is recommended.

提交回复
热议问题