0

Developers have many run configurations in IntelliJ IDEA storred in .idea/workspace.xml

Dilemma: Should I include workspace.xml in Git?

No -> Defeats the purpose of source control
Yes -> Do I create a branch for every developer? Do I save it as workspace_developer_name.xml?

Makoto
  • 100,191
  • 27
  • 181
  • 221
Stepan
  • 1,514
  • 17
  • 35
  • Possible duplicate of [Which files in .idea folder should be tracked by Git?](https://stackoverflow.com/questions/43198273/which-files-in-idea-folder-should-be-tracked-by-git) – Makoto Oct 03 '18 at 19:16

1 Answers1

2

Check this answer.

You need to make the run configuration Shared. Then you can add .idea/runConfigurations/*.xml files to the version control per this document.

workspace.xml should not be included into the version control.

CrazyCoder
  • 371,688
  • 155
  • 943
  • 850
  • Can you please expand your answer? Shared seems to mean "a version of a file is saved in Git and conflicts with local copy on each checkout for other developers". – Stepan Oct 04 '18 at 20:06
  • @Stepan you can ask developers to use different names for the run configurations that can have conflicts. – CrazyCoder Oct 04 '18 at 20:08
  • @Stepan JetBrains team has no problem sharing the configurations between the developers, [see here](https://github.com/JetBrains/intellij-community/tree/master/.idea/runConfigurations). – CrazyCoder Oct 04 '18 at 20:09