49

I am getting Git error: inflate: data stream error (unknown compression method) fatal: failed to read object <hach>: Invalid argument error when I try do $ git status. How can I fix it?

6
  • 3
    I think this question has been already asked and answered here: stackoverflow.com/questions/37739797/…. Commented Jan 19, 2017 at 12:30
  • I saw this question. And tryed.. I do $ git fsck --full, then delete error file, then when I do $ git fsck, I get "error: inflate: data stream error (unknown compression method) error: unable to unpack a6cbf8ee9712f58427bba10bf816046315e2f506 header error: inflate: data stream error (unknown compression method) fatal: loose object a6cbf8ee9712f58427bba10bf816046315e2f506 (stored in .git/objects/a6/cbf8ee9712f58427bba10bf816046315e2f506) is corrupt" Commented Jan 19, 2017 at 12:34
  • Are you sure you see it while running git status? Can you try a separate clone? Commented Jan 19, 2017 at 12:56
  • 1
    Possible duplicate of git fatal: failed to read object xxx: Invalid argument Commented Mar 5, 2017 at 21:37
  • @Isergreev did you fixed it? Commented Oct 2, 2017 at 14:33

2 Answers 2

41
  1. Do a git fsck --full
  2. Did it report a corrupted file?
  3. If so delete the file, go back to step #1.
  4. Do del .git/index
  5. Do git reset
Sign up to request clarification or add additional context in comments.

Comments

7

I think it happened because maybe your computer or files were corrupted.

First back up your .git folder, then use git fsck --full command to check your file system then delete corrupt files and check it again until your problem disappear

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.