This morning, I started getting this error from git:
fatal: index file smaller than expected
fatal: git status --porcelain failed
To those having isses even after removing index and cannot do a reset. If you want to keep your changes do the following (not a solution but rather an ugly workaround!).
My case was as described above, git had messed up its references... Git log
was showing "your branch seems to be broken" and git fsck
was giving me warnings about bad references. Figured if I can probably fix it but I'd spend a lot of time doing it, so I went for the ugly workaround.