2

I was trying to merge my master branch with another one called pull-stage, but Git throws me this error:

error: inflate: data stream error (invalid distance too far back)
error: corrupt loose object '5a63450f4a0b72abbc1221ccb7d9f9bfef333250'
fatal: loose object 5a63450f4a0b72abbc1221ccb7d9f9bfef333250 (stored in .git/objects/5a/63450f4a0b72abbc1221ccb7d9f9bfef333250) is corrupt

How can I solve this issue?

I have reviewed other posts, but with no successful results:

Community
  • 1
  • 1
Israel
  • 3,012
  • 4
  • 34
  • 52
  • 1
    possible duplicate of [Git: "Corrupt loose object"](http://stackoverflow.com/questions/4254389/git-corrupt-loose-object) – CharlesB Sep 20 '12 at 09:47
  • If you have reviewed the posts, then you know that there's no other solution to get objects from another clone that has it, see the linked posts for details – CharlesB Sep 20 '12 at 09:48

1 Answers1

1

I had the same error recently, after a crash of the virtualbox guest I was running git in. I did the following, and it fixed my specific issue. Please backup your tree before attempting this.

  1. delete the loose object rm .git/object/5a/63450f4a0b72abbc1221ccb7d9f9bfef333250

  2. edit logs/refs/head/, and find the commit id before the last one.

  3. edit refs/head/, and use the old commit id

this should allow you to get back to standard git operation (but the last commit will be lost).

shiva
  • 731
  • 6
  • 13