Rider: documentation on adding project specific configuration to git?

Answered

I am a big fan of git worktree support, because it lets me work on several branches of the same project concurrently (for example, one folder for development and another folder for doing code reviews). This works really well, except for the fact that I have to duplicate settings in Rider across those folders. Examples of this are: database connections and sql scripts/consoles (when using the database functionality in Rider), run/debug configurations, project configurations of plugins (GitToolbox), "scratches and consoles".

On youtrack I noticed there are a couple of issues related to better integration of git worktree in the IDE. In one of those issues, I found the following comment: "To avoid additional reimports and setup, you should just add your project configuration (at least Run configurations and other options you want to copy) to git". (see https://youtrack.jetbrains.com/issue/IDEA-209749#focus=streamItem-27-3363172.0-0)

Where can I find documentation on how to do that? When I search for it, I always end up on the documentation for version control support in Rider.

3 comments
Comment actions Permalink
Hello Ruben, Try this: go to Run/Debug configurations window and set on "Share through VCS" checkbox on the top right. Hope this helps.
0
Comment actions Permalink

Hi Alexandra,

In the released Rider, I only have a checkbox for "Share", but I saw that in the EAP there's a checkbox "Share through VCS". This will only work however, if I put the ".idea" folder under source control. I am very reluctant to do that, because we've done that before and it just caused problems within the team. Several people within my team use Rider, but on multiple platforms: OSX, Linux and Windows. Files within the ".idea" folders contain paths to locations on disk where the source code is placed, and those locations are different for everyone. Is it possible to only add parts of the ".idea" folder to source control and, if so, is there any documentation on what each part of the ".idea" folder contains?

0
Comment actions Permalink

Hi Ruben,
I apologise for so long answer.
When you set on a "Share" checkbox, the configuration stores in `%solution%\.idea\.idea.Codewars\.idea\runConfigurations` folder.

You can add only this configuration file to VCS for sharing.

I've attached a screenshot of example configuration, so you can see that paths are changed into placeholder so it shouldn't make problems in different OS. 

0

Please sign in to leave a comment.