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

Cod*_*ein 18 git gitignore webstorm

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

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)?

Pra*_*ran 24

基于JetBrains,您不应将workspace.xmltasks.xml放在repo中,因为它们包含用户特定的设置.