bad index file sha1 signature fatal

Sometimes sourceTree prompts a “Bad Index File Sha1 Signature fatal: index file corrupt” error while performing operations such as Commit or REVERT, causing the operation to fail. This is due to an error in Git’s index file. You need to delete the.git/index file and then run Git Reset in the repository directory to regenerate the index file. Git Reset can also delete information that is committed but not pushed.
$ git status
Error: bad index File sha1 signature fatal:
index file corrupt
First delete the index file $
Rm – f. git/index
$ git reset

Read More: