source: http://makandracards.com/makandra/5899-how-to-fix-a-corrupt-git-index If your git index for some reason becomes invalid, no need to worry. Your index is corrupt when you see this error running usual git commands like git pull , git status , etc.: error : bad index file sha1 signature fatal : index file corrupt Though it sounds bad, your changes are still there. Fix it by first removing the index file, then resetting the branch: rm . git / index git reset You should be all good now. To be safe, make a backup of .git/index before you delete it.
The reason for doing the work is to create something useful that helps people. Please click the ads if my articles are useful for you. Definitely, that's not enough. My target is working at some great organizations, such that one day, all the people with internet access can benefit from the service I contributed.