Should the .idea folder be kept under source control?

16,707

Solution 1

No, because it's not guaranteed that other developers also use Intellij idea. Source control has to contain only necessary files to build project.

Solution 2

Yes, because all the developers that use IDEA should be using the same project files. If other developers use other IDEs, they should add their project files to Source Control also. After all, we "need" the project files to build the project, don't we?

Share:
16,707
ripper234
Author by

ripper234

See blog or LinkedIn Profile

Updated on June 08, 2022

Comments

  • ripper234
    ripper234 about 2 years

    Possible Duplicate:
    Intellij Idea 9, what folders to check into (or not check into) source control?

    The question is general, although specifically I'm interested right now in PyCharm, not Java development.

  • Alexander Oleynikov
    Alexander Oleynikov over 13 years
    Plus .idea files contain personal settings like toolbar layout and build configurations. These things are individual for each developer.
  • urig
    urig over 10 years
    It's true that JetBrains' documentation recommends adding IDEA specific project files to be added to source control (see here: jetbrains.com/idea/webhelp/project.html. At the same time, if you're working on a public project, you would probably not want to force consumers to use any specific IDE. The essential information about your project's structure really should be stored in a free to use tool, like Maven for example.
  • nine stones
    nine stones over 10 years
    I disagree. You SHOULD share your build configurations with your peers to make sure you run the same.
  • uvsmtid
    uvsmtid about 5 years
    @ninestones, build configurations should NOT use IDE to build the project. However, the question really comes down to "How much strictly unnecessary yet related stuff should project sources contain for convenience?" If one takes a banana, he may not necessarily needs a monkey. And the larger the audience, the bigger the zoo of animals one will see by taking that fruit.