git - fatal: Unknown index entry format

31,176

Solution 1

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.

Solution 2

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

Share:
31,176
Balaji Kartheeswaran
Author by

Balaji Kartheeswaran

Updated on November 25, 2020

Comments

  • Balaji Kartheeswaran
    Balaji Kartheeswaran about 2 years

    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.