Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Git 仅在phpstorm中存在错误的索引文件sha1签名_Git_Phpstorm - Fatal编程技术网

Git 仅在phpstorm中存在错误的索引文件sha1签名

Git 仅在phpstorm中存在错误的索引文件sha1签名,git,phpstorm,Git,Phpstorm,Commit在git命令行和gitgui(相同的repo)中工作正常 但是在phpstormcommit中,提交失败并返回: bad index file sha1 signature fatal: index file corrupt 我试过了 rm -f .git/index git reset 但问题依然存在。 这里发生了什么以及如何修复phpstorm中的提交?这可能是一个缓存问题,我今天早上刚刚遇到了类似的问题,请尝试: git rm -r --cached . &&

Commit在
git
命令行和
git
gui(相同的repo)中工作正常 但是在
phpstorm
commit中,提交失败并返回:

bad index file sha1 signature
fatal: index file corrupt
我试过了

rm -f .git/index
git reset
但问题依然存在。
这里发生了什么以及如何修复
phpstorm
中的提交?

这可能是一个缓存问题,我今天早上刚刚遇到了类似的问题,请尝试:

git rm -r --cached . && git add .
编辑:通常只有第一行就足以修复PhpStorm问题

git commit -am 'git cache cleared'
git push

如果您有另一个.git文件夹或git项目,请在项目内部进行验证。

看起来像是常见的索引中断问题。奇怪的是,您只能在使用pHPStorm时重复它。您的项目中有多少存储库?