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

时间:2014-12-25 14:06:01

标签: git webstorm 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

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

这是明智的做法吗?如果git忽略了您的workspace.xml文件,那么它会破坏您在IDE中的体验(在我的例子中,Jetbrains Webstorm)?

1 个答案:

答案 0 :(得分:21)

根据JetBrains,您不应将 workspace.xml tasks.xml 放在repo中,因为它们包含用户特定的设置。

相关问题