git - fatal: Unknown index entry format

GitGithub

Git Problem Overview


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.

Git Solutions


Solution 1 - Git

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 - Git

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

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionBalaji KartheeswaranView Question on Stackoverflow
Solution 1 - GitRené HöhleView Answer on Stackoverflow
Solution 2 - GitSuper JadeView Answer on Stackoverflow