Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git error: inflate: data stream error (unknown compression method)

Tags:

git

bitbucket

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?

like image 643
lsergeev Avatar asked Jan 19 '17 12:01

lsergeev


2 Answers

  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
like image 160
ozba Avatar answered Nov 08 '22 20:11

ozba


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

like image 35
Mohsen Jalalian Avatar answered Nov 08 '22 22:11

Mohsen Jalalian