git - fatal: Unknown index entry format

When I'm trying use git status or git checkout master or git pull,

I'm getting an error :-

"fatal: Unknown index entry format 61740000".

I've tried to Reinitialize existing Git repository. But it did not fix the problem.

I'm new to git, and I have just made a first branch and make some changes and trying to commit the changes.

Tried searching on Google but can't find the right solution for the code 61740000.

Edit: Deleted the whole local repository and then again cloned from remote repository (git status worked), created a branch (git status worked) and made changes to files (git status error).

Please help.


When your index is broken you can normally delete the index file and reset it.

rm -f .git/index
git reset

or you clone the repo again.


Regardless of the error code at the end of

fatal: Unknown index entry format

your git index file is corrupt. (I achieved this error after doing a find and replace for all files.)


If using a Windows Command Prompt,

del .git\index

will delete the index file and

git reset

will reset it.

Windows Command Prompt