git - fatal: Unknown index entry format

后端 未结 2 1586
盖世英雄少女心
盖世英雄少女心 2021-02-03 17:34

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

I\'m getting an error :-

相关标签:
2条回答
  • 2021-02-03 17:51

    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.

    0 讨论(0)
  • 2021-02-03 17:51

    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.

    0 讨论(0)
提交回复
热议问题