Appears in git use: git fatal: index file smaller than expected

Appears in git use: git fatal: index file smaller than expected

The index file of git is damaged, just delete the corresponding index file and rebuild

rm -rf .git/index
git reset HEAD .

Guess you like

Origin blog.csdn.net/weixin_35773751/article/details/130758547