Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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 instructions provided by an article on the JetBrains site, titled "How to manage projects under Version Control Systems". But, many comments on the article warn against implementing it as a method for sharing project settings. And I've run into a few issue with the method, namely not everything I'd like to be shared, is actually shared with team members.

I've also tried using the function found under the File->Settings Repository menu of the JetBrains tools. It shares some settings between users, and I like that it automatically creates commits to the Git repo, but it doesn't share all the settings. The settings that are shared work great! But, it seems like the "Settings Repository" feature is a work in progress.

I've read many discussions on this topic, but no definitive answer on a way to share IDE level settings and, at the same time, project specific settings when using the JetBrains tools. Not to mention, I use a multiple JetBrains tools (PhpStorm, PyCharm, WebStorm and IntelliJ). I'd like it if there were a solution that also shared settings between all the tools, because some settings are global across all JetBrains tools, some are specific to a particular tool, and some are specific to a project.

Sharing settings between JetBrains tools is more of a "nice to have". What I really need to know is, how can I share global IDE settings and project level settings easily between team members. But, I'll give mad respect points to anyone who can figure out both. :-)

like image 410
MikeyE Avatar asked Jan 13 '17 23:01

MikeyE


People also ask

Can you share projects on IntelliJ?

We can use IntelliJ IDEA to share this project on GitHub, we can go to the VCS menu and select Share project on GitHub. If we're not already logged in to GitHub via IntelliJ IDEA, we'll be shown a log in dialog where we can enter our GitHub username and password.

How do I transfer PyCharm settings?

From the main menu, select File | Manage IDE Settings | Import Settings. In the dialog that opens, specify the path to the backup directory and click Open. PyCharm shows a confirmation popup. Note, that after you apply the settings from the backup, these settings will be overwritten with your current IDE configuration.

How do I copy IntelliJ configuration?

Open Left Project Pane -> Copy . run folder -> open another project without closing intellij -> Paste on main project level. Your previously saved run config appears here.


1 Answers

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. <project_directory>/.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:

  • <project_folder>/.idea/runConfigurations/ contains all of your debug and run configurations used to run nose tests and debug into your code.
  • <project_folder>/.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:

enter image description here

like image 124
MikeyE Avatar answered Sep 28 '22 08:09

MikeyE