Recently, we got the following error from
$ git status fatal: index file smaller than expected
To fix it, without losing local changes, we removed the corrupted index and reset back to the HEAD using the following commands:
$ rm .git/index $ git reset HEAD .
This post is also available in: Greek