小编典典

不能忽略 .idea/workspace.xml - 不断弹出

all

使用 PHPStorm,我试图忽略workspace.xml每次尝试进行 git 提交时弹出的内容。

我的.gitignore样子:

/.idea/
.idea/workspace.xml

因为在某个时间点文件已提交,我还执行了:

git rm --cached .idea/workspace.xml然后提交删除,推送到一个裸仓库。

但是当我在项目中进行更改时,该文件会不断弹出。

关于我所缺少的任何想法?


阅读 178

收藏
2022-05-18

共1个答案

小编典典

我不得不:

  • 从 git 中删除文件
  • 将提交推送到所有遥控器
  • 确保所有其他提交者从远程更新

命令

git rm -f .idea/workspace.xml
git remote | xargs -L1 git push --all

其他提交者应该运行

git pull
2022-05-18