It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

'git status' failed with code 128: error: bad signature fatal: index file corrupt

Ralph Cossio Oct 07, 2015

The moment I start up my sourceTree, I get this error. How to resolve it without damaging my current project files?

6 answers

1 accepted

10 votes
Answer accepted
Renato Rudnicki Atlassian Team Oct 07, 2015

Hi Ralph, 

 

If the problem is with the index as the staging area for commits (i.e. .git/index), you can simply remove the index (make a backup copy if you want), and then restore index to version in the last commit. On SourceTree shell run:

On OSX/Linux:

rm -f .git/index
git reset

On Windows:

del .git\index
git reset

(The reset command above is the same as git reset --mixed HEAD)

 

 

Cheers, 
Renato Rudnicki 

Yorick van de Haar Dec 07, 2016

Thanks, this solved the problem however it surprises me that I had to use the OSX/Linux command on my windows machine.

 

yu yang Jian May 03, 2017

Use OSX/Linux command on my windows machine +1

AlexGreen Jul 05, 2017

git reset


error: inflate: data stream error (invalid code lengths set)
error: unable to unpack 64e00659b39bc2ec92b15903426745a9ca0e7469 header
error: inflate: data stream error (invalid code lengths set)
fatal: loose object 64e00659b39bc2ec92b15903426745a9ca0e7469 (stored in .git/objects/64/e00659b39bc2ec92b15903426745a9ca0e7469) is corrupt

Michael Dale Aug 29, 2018

I too had to use the Above OSX/Linux command on my machine as well....

Like Squiggle Squiggle likes this
0 votes
Ralph Cossio Oct 10, 2015

Thanks.. It worked.. Sorry for the late reply

Renato Rudnicki Atlassian Team Oct 21, 2015

Hi Ralph, glad to hear that :) If you don't mind, I would kindly ask you to accept it so the same will be visible to others who might be facing the same issue you have inquired.

Ralph Cossio Oct 22, 2015

just did.. sorry :)

0 votes
Mikhail Grunko Jun 15, 2016

I deleted my project (root folder) and created it again. It was the fastest and simplest way in my case.

Save all you changes, before you delete you project!

0 votes
Anton Aug 20, 2016

I get this all the time.

I almost hate it already!

Steps to reproduce are simple.

Just create a new branch, commit something, then switch to develop, merge your branch to develop and delete it. And observe the bug.

The only way to fix is to delete the wholerepo fromsourcetreeand add it again.

Can the issue be fixed? Please?

0 votes
Harinarayanan T May 17, 2017

I restarted my windows system and then opened the source tree. It is automatically resolved !!

0 votes
Arif Mustaffa Apr 25, 2018

Works for me. Thanks.

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Posted in Sourcetree

[dev team] Sourcetree for Windows 2019 Preview - Dark Theme

Hi folks, While the full post is over on our blog I'd like to share the dark theme we've got planned for 2019 here directly as well to keep the discussion going.  The ...

1,862 views 14 18
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you