The following error keeps repeating even after I’ve tried the recommended:
rm .git/index
git resetBut I still get this error:
error: bad index file sha1 signature
fatal: index file corrupt
fatal: 'git status --porcelain' failed in submodule '[directory path omitted]'What's wrong? What should I do?
41 Answer
I had that problem, and I tried to fix it with this:
rm -f .git/index
git resetBUT it did not work. The solution?
For some reason I had other .git folders in sub directories. I delete those .git folders (not the principal) and git reset again. Once they were deleted, everything worked again.