0

I'm trying to pull from the class server but I get this error whenever I try:

error: object file .git/objects/6d/6a0de342a65950d909883a1057ce117b241945 is empty
error: object file .git/objects/6d/6a0de342a65950d909883a1057ce117b241945 is empty
fatal: loose object 6d6a0de342a65950d909883a1057ce117b241945 (stored in .git/objects/6d/6a0de342a65950d909883a1057ce117b241945) is corrupt

Anyone know why this may be? It seems git is corrupted, but I'm at a loss as to how I'd go about fixing this.

2 Answers2

0

The client is definitely telling you the code in the repository is corrupt. That may be true or it may be an issue with permissions, communications or caching issue.

Are others able to access the server class?

Here's a similar issue. How do I deal with corrupted git object files?

Community
  • 1
  • 1
Sammy
  • 467
  • 3
  • 13
0

First, you should run git fsck to check for other corrupted objects in your repository.

Second, you'll need to find a clean copy of that file. Your best bet is to check out another copy of the project from the server and look for the file there. If you find it, replace the corrupted copy.

If a fresh checkout from the server doesn't have that file, it's probably part of a local commit on your own machine that hasn't been pushed to the server yet. In that case, you may have to delete and re-create some of your commits.

Lastly, you should investigate how the file got corrupted in the first place. Checking your hard drive for errors would be a good idea.

Wyzard
  • 33,849
  • 3
  • 67
  • 87
  • This happened within a VM - that probably means the VM went to sleep/shut down during such a time that the file(s) got corrupted. –  Oct 15 '15 at 04:06
  • If the VM was suspended, its RAM is saved so any pending writes should just finish when it's resumed, without corruption; it's similar to hibernating a laptop. But if you abruptly killed the running VM without doing a clean shutdown of its OS, that can certainly cause corruption; it's like yanking the power cord or battery from a physical computer. – Wyzard Oct 15 '15 at 04:10
  • ahh gotcha yeah that's probably what happened then - i'll be more careful from now on –  Oct 16 '15 at 04:43