by eidam

git pull error – corrupted .git files

Sometimes when I want to pull a git repository, I get this error message:

For unspecific reasons some of my .git object files have size 0 and don’t let me make pull. I found out, that the solution here is to remove all these files. The next pull command will then recreate all necessary files that I have removed. But this requires a lot of patience since there should be tens of corrupted files. The “find” command should do all this work for you, so the easy solution here is to use:

This will find all files in object folder with size 0 and remove them. Then you just pull again…

You also should backup your object folder before doing this.