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

lsergeev picture lsergeev · Jan 19, 2017 · Viewed 32.9k times · Source

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?

Answer

ozba picture ozba · Mar 19, 2018
  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