In JetBrains tools, how can I share IDE and project settings between multiple developers?

后端 未结 1 695
迷失自我
迷失自我 2021-02-20 15:26

I love the JetBrains tools. But, I can\'t find a way to effectively share settings at the IDE level and the project level with team members. To date, I\'ve followed instruction

1条回答
  •  太阳男子
    2021-02-20 15:48

    I finally found a few minutes to write up an answer to this. I want to write up a more complete answer, but I've been incredibly busy lately so this will have to do for now.

    This solution describes what I've been using to share code and settings of PyCharm projects. There is one caveat to this solution, which I'll attempt to describe and detail a work-around for.

    Following the instructions on JetBrain's knowledge-base, we'll add the entire project folder to a Git repo. But, before doing so, be sure to exclude at least the workspace.xml file by creating a .gitignore file in the project directory and add at least the following line:

    .idea/workspace.xml
    # JetBrains also recommends  adding tasks.xml, but I found it useful to
    # share tasks with team members.
    # Uncomment the following line to avoid sharing tasks with team members
    # .idea/tasks.xml
    

    You'll definitely want to add workspace.xml to .gitignore because it stores all of your local window sizes, debug panel layouts and the like. My team found it useful to syncronize our tasks, so that we could coordinate work. But, every team works differently, so use your own discretion.

    There are three main locations project and personal preferences are stored:

    1. /.idea contains project specific settings.
    2. $HOME/.PyCharmYYYY.M/config contains options for all projects managed by PyCharm (or substitue "PyCharm" for any other JetBrains tool).
    3. If you use the shared settings found in File->Settings Repository, $HOME/.PyCharmYYY.M/config will contain all of the settings shared via JetBrain's built in "shared settings" function. I and my team didn't care for it, because it seemed to automatically share some things we didn't want to (like the color theme, and key mappings). And we weren't able to select a sub-set of options to share team-wide. Long story short, it didn't give us the flexibility and control we need.

    We did try using options 1 and 3 at the same time, but it was too unwieldy. For example, one person would change a font, and it would change it for the whole team the next time we re-launched JetBrains. It was a mess. If you do decide to try out using options 1 and 3, I recommend proceeding with extreme caution.

    Presently, we are using only option 1, and it's working out quite nicely.

    A few other notable folders you might want to add or remove from the .gitignore file are:

    • /.idea/runConfigurations/ contains all of your debug and run configurations used to run nose tests and debug into your code.
    • /.idea/scopes/ contains all of the scopes used to filter your view of the project files, into more management groupings.
    • $HOME/.PyCharmYYYY.M/options contains all of the global options for version of PyCharm you're using. For example, the color scheme, key mappings and any other non-project specific options. For a full list of other global settings, see this JetBrains article, or the following excerpt:

    0 讨论(0)
提交回复
热议问题