相关疑难解决方法(0)

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

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

.gitignore看起来像:

/.idea/
.idea/workspace.xml
Run Code Online (Sandbox Code Playgroud)

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

git rm --cached .idea/workspace.xml 然后承诺删除,推到一个裸的回购.

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

关于我失踪的任何想法?

git intellij-idea phpstorm

214
推荐指数
7
解决办法
9万
查看次数

我应该将.idea/workspace.xml添加到gitignore吗?

当我尝试签出另一个分支时,我收到此错误:

error: Your local changes to the following files would be overwritten by checkout:
        .idea/workspace.xml
Please, commit your changes or stash them before you can switch branches.
Aborting
Run Code Online (Sandbox Code Playgroud)

我做了一些研究,似乎有些人通过添加前面提到的文件来避免这个问题gitignore.

这是明智的做法吗?如果git忽略了你的workspace.xml文件,它会不会搞乱你在IDE中的经验(在我的例子中,Jetbrains Webstorm)?

git gitignore webstorm

18
推荐指数
1
解决办法
1万
查看次数

标签 统计

git ×2

gitignore ×1

intellij-idea ×1

phpstorm ×1

webstorm ×1