2

My computer turned off unexpectedly and it now seems all git commands result to this:

error: object file .git/objects/fd/5cdc549bf9104990c5933c4c5bfddb6ba7fed8 is empty error: object file .git/objects/fd/5cdc549bf9104990c5933c4c5bfddb6ba7fed8 is empty fatal: loose object fd5cdc549bf9104990c5933c4c5bfddb6ba7fed8 (stored in .git/objects/fd/5cdc549bf9104990c5933c4c5bfddb6ba7fed8) is corrupt

As a result , I am getting some of the files blank.

Mutai Mwiti
  • 487
  • 1
  • 7
  • 20
  • this is not an git issue, but an FS issue. – frlan Jan 16 '17 at 11:39
  • 1
    ...and this is why it's important to have a good backup strategy - you do have backups, I hope ? – Paul R Jan 16 '17 at 11:48
  • You have a backup, right? If you have an upstream repo, you can simply reclone (loosing the work since the last `git push`, of course). Otherwise, there is little you can do: You are missing some data, and all the trees/commits that depend on that data are corrupt as a consequence. Of course, you might try to narrow down which objects are actually corrupt, and which other objects depend on those corrupt objects, in an attempt to recover all the data that's still recoverable. But I guess, that might be difficult. – cmaster - reinstate monica Jan 16 '17 at 11:49
  • try to ask on the git mailing list, maybe someone can hack a solution https://git-scm.com/community – pedrorijo91 Jan 16 '17 at 15:06
  • just out of curiosity, if you do a git fsck, does it attempt to fix anything? – jbu Jan 17 '17 at 01:33
  • Git got messed seriously because just about any command results to the error message. – Mutai Mwiti Jan 17 '17 at 04:27

0 Answers0