index file smaller than expected

前端 未结 3 1095
滥情空心
滥情空心 2021-02-01 00:25

This morning, I started getting this error from git:

fatal: index file smaller than expected

fatal: git status --porcelain failed

3条回答
  •  你的背包
    2021-02-01 01:01

    If you want to keep local changes, use the following:

    $ rm .git/index
    $ git reset HEAD .
    
    > Unstaged changes after reset:
      modified foo.txt
      modified bar.txt
    

提交回复
热议问题