git - 索引文件小于预期

标签 git

今天早上,我开始从 git 中收到这个错误:

fatal: index file smaller than expected

fatal: git status --porcelain failed

知道发生了什么以及如何解决它吗?

最佳答案

索引文件已损坏,但很容易重新创建。只需删除它...

rm .git/index

然后您可以重新添加您尝试暂存的文件。

关于git - 索引文件小于预期,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10076036/

相关文章:

python - 无法在python中导入git

git - cherry-pick 是否从原始分支中删除了提交?

linux - git bash : How to move to a directory

svn - 如何查看已 checkin git,但尚未通过 dcommit 提交给 svn 的内容?

python - 尝试部署到heroku但不断被拒绝

git - 仅针对 stash 命令关闭 git 中的寻呼机

git - 为什么 git 提示我输入 pull 后 merge 提交消息?

python - 如何在 git 上构建多个函数以在 Google Cloud Functions 上自动部署?

另一个 Remote 的 git 状态

git - CocoaPods `pod install` 错误 : cannot open FETCH_HEAD: Permission denied