SourceTree Error: 'git status' failed with code 128: error: inflate: data stream error (incorrect header check)
Asked Answered
A

6

6

I got this error with open SourceTree

$ git fsck --full
error: inflate: data stream error (incorrect header check)
error: unable to unpack 06c147f2771e280dfb4758c9a83b94346993d172 header
error: inflate: data stream error (incorrect header check)
fatal: loose object 06c147f2771e280dfb4758c9a83b94346993d172 (stored in .git/objects/06/c147f2771e280dfb4758c9a83b94346993d172) is corrupt

also, try this, and remove the all corrupted objects. after removing objects i write this command,

$ git reset --hard
error: unable to read sha1 file of 3X/3X.Core/Resources/Resource.Designer.cs (d46f74436ae02ec61a659a8a487aee5747e2feda)
error: unable to read sha1 file of 3X/3X.Core/Resources/Resource.resx (63342162564404ccae4917489dc78ebb65075f8a)
error: unable to read sha1 file of 3X/3X.Web/Views/Job/ConfirmationAdvice.cshtml (ff39e42f5cf0e0703bd9dfe84a4b746ff91eea40)
error: unable to read sha1 file of 3X/3X.Web/Views/Job/Create.cshtml (3a97827faac6c62fd24f347dd0b0951c27c03751)
error: unable to read sha1 file of 3X/3X.Web/Views/Job/DataEntry.cshtml (89f381bafaeff53eeaf64a26d8c9608e9e86b6a1)
error: unable to read sha1 file of 3X/3X.Web/wwwroot/js/viewjs/Job/create.js (1b62c618c31add2ca28d107c1a49604492409ecf)
fatal: Could not reset index file to revision 'HEAD'.

and got above error

Agogue answered 14/6, 2017 at 12:21 Comment(5)
try doing it from command lineStaciastacie
@DaniyalSyed I tried that but not worksAgogue
what error are you getting on command lineStaciastacie
@DaniyalSyed -- > $ git fsck --full error: inflate: data stream error (incorrect header check) error: unable to unpack 06c147f2771e280dfb4758c9a83b94346993d172 header error: inflate: data stream error (incorrect header check) fatal: loose object 06c147f2771e280dfb4758c9a83b94346993d172 (stored in .git/objects/06/c147f2771e280dfb4758c9a83b94346993d172) is corrupt ------------------------------------------------------------------------------------------I removed all these corrupt objects and also use "$ git reset --hard", this returns "fatal: Could not reset index file to revision 'HEAD'."Agogue
check this #23726425Staciastacie
M
5

Try with removing your index file which is in .git folder

Windows System:

del .git\index
git reset

Linux System:

rm -f .git/index
git reset

And if you have deleted index file manually then you need to do

git reset
Marmolada answered 26/5, 2020 at 9:0 Comment(0)
P
2

It should be corrupted. Try removing this .git/objects/06/c147f2771e280dfb4758c9a83b94346993d172

If you are getting same error with another object try removing all those and fetch again.

Personify answered 14/6, 2017 at 13:41 Comment(1)
I tried that but it's not working. Do you have any other trick?Agogue
D
0

Here is the solution that worked for me i opened my server and went to .git/ and downloaded index file from there then deleted the local .git/index file manually and replace the file with the downloaded index file

Depolarize answered 2/1, 2020 at 20:57 Comment(0)
H
0

Tried all answers and none worked with me.

Finally figured out that the problem is that you have probably configured your Source Tree repo to be located at repo_local_url/.git

The solution is to make it point at repo_local_url instead

Hazel answered 15/2, 2022 at 8:19 Comment(0)
S
0

I got this issue because I accidentally removed the git/objects folder. When I restored it from the Recycle Bin it worked again.

Shipman answered 3/8, 2022 at 14:13 Comment(0)
P
0

I'm not sure why this did the trick but it was the solution.

I had an issue where the git version of 2.34.1 would NOT work suddenly for some reason.

I was able to upgrade to the latest git, version 2.46.0 and then it worked!!!

Steps to do this:

sudo add-apt-repository ppa:git-core/ppa

sudo apt update

sudo apt upgrade git

Propel answered 14/8 at 23:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.