[Solved] ‘git status’ failed with code 128:’fatal: index

 

This is because your index file has been corrupted. You could do the following. Using the terminal and changing your directory to your repository you can do the following (making sure you back up your repository first, just in case):

rm.git/index
gitadd.

Or if you have changes in your working directory you want to keep you can do the following:

rm.git/index
gitresetHEAD.

This can also be caused by conflicts with submodules, so if you have any submodules it might be worth looking into it.

Try that out and if it works if you could comment back to let me know that’d be great.

Thanks!

 

Similar Posts: