Search code examples
gitwebstormgitignore

Should I add .idea/workspace.xml to gitignore?


When I try to checkout another branch, I get this error:

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

I did some research and it seems some people avoided this problem by adding the afformentioned file to gitignore.

Is this a wise thing to do? If git is ignoring your workspace.xml file, won't it mess up your experience in the IDE (in my case, Jetbrains Webstorm)?


Solution

  • Based on JetBrains you should not place the workspace.xml and tasks.xml in repo, as they contain user specific settings.