This morning, I started getting this error from git:
fatal: index file smaller than expected fatal: git status --porcelain failed
fatal: index file smaller than expected
fatal: git status --porcelain failed
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