From one pull to the next, every git pull on the server ends up in this:
$ git pull remote: Counting objects: 53, done. remote: Compressing objects: 100% (32/32), done. remote: Total 32 (delta 19), reused 0 (delta 0) Unpacking objects: 100% (32/32), done. error: unable to find 71682baccff823caa21420b16dd231c6b9c1b133 fatal: object 71682baccff823caa21420b16dd231c6b9c1b133 not found Same with git fetch. I could solve this for one pull by copying the file .git/object/71/682baccff823caa21420b16dd231c6b9c1b133 to the server, but after some more pulls, the error was still there, every time with the newest commit object on the branch.
How can this happen? And how can I fix it for good?
A complete git clone is not a good solution since this repository is on a running server project and has more files around without git control.
Is it possible to clone into a new directory and then copy the .git directory into the old folder? Or is there any other solution without touching the directories?
git clonein another directory and compare the contents of the.gitdirectory in both these repos ? This might show you which objects are missing.git pull. Also in a freshly cloned repo, all objects are compressed and comparison isn't really possible.git fsckto verify the validity of all the objects in the .git directory, and any missing ones.git gcmight also help in pruning out unneeded objects..gitdirectory (or parts of its contents)! It contains the whole history (and more), messing around there will destroy the project if you don't know exactly what you are doing. And I'd go rummaging in there only in a copy of the full repository.