4 comments
Avatar
Tatiana Shabaeva
Official comment

Hi Jakob.

In general - yes, you've found the right article.

Which project settings do you want to share specifically?

Hi,
Code formatting, file headers and a common dictionary.

Okay, how does it then work if these settings are shared but settings also exists in the project folde? Which settings are used?

Thanks :)

0
Avatar
Tatiana Shabaeva

Code formatting settings can be shared via File | Export Settings -> Code Style (schemes), saving the .jar, then File | Import Settings (as well as via Settings Repository plugin which is described in the article).

Note that there are project-level and IDE-wide code style schemes. Project ones are stored in .idea folder while IDE-wide reside in ~Library/Preferences/AppCode<version>/codestyles

When you import settings via Settings Repository, it means that effectively you import IDE-wide settings. In case you want to share specific project settings, you need to share contents of .idea folder. That applies to dictionaries (project-level ones are stored in .idea folder).

In case you share IDE-wide settings via Settings Repository plugin, there are options to merge them or overwrite (either local or remote), so that depends on user choice.

Settings in .idea folder take precedence over IDE-wide.

As for file headers, did you mean custom file header templates? If yes, you should be able to share those via File | Export Settings -> File templates.

 

1

Hi
I have tried to configure it now. I have created a git repository and pointed the Settings Repository plugin to it. But, the plugin keeps adding files like colors.scheme.xml which I don't want to be shared between all developers in the team. Is that something I have setup wrong or should I just add it to the git ignore in the root of the directory?

Also, when doing this I did myself lose the configurations not defined in the files I added to the repository - like e.g. the same color file again. How do I keep my local setup for stuff that should be configurable for each team member while using the Setting repository to maintain the same code style among all team members?

 

Thanks :)

0

Please sign in to leave a comment.