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?
Asked
Active
Viewed 4.4k times
45
-
3I think this question has been already asked and answered here: http://stackoverflow.com/questions/37739797/git-fatal-failed-to-read-object-xxx-invalid-argument. – delca85 Jan 19 '17 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" – lsergeev Jan 19 '17 at 12:34
-
Are you sure you see it while running `git status`? Can you try a separate clone? – UserASR Jan 19 '17 at 12:56
-
1Possible duplicate of [git fatal: failed to read object xxx: Invalid argument](http://stackoverflow.com/questions/37739797/git-fatal-failed-to-read-object-xxx-invalid-argument) – superjos Mar 05 '17 at 21:37
-
@Isergreev did you fixed it? – Carmine Tambascia Oct 02 '17 at 14:33
-
I have this issue now - did you ever resolve? – Sprose Nov 21 '17 at 15:20
2 Answers
39
- Do a
git fsck --full
- Did it report a corrupted file?
- If so delete the file, go back to step #1.
- Do
del .git/index
- Do
git reset

ozba
- 6,522
- 4
- 33
- 40
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

abulkay
- 409
- 4
- 13

Mohsen Jalalian
- 1,062
- 2
- 18
- 32