Git and where are build/run configurations stored
Background: I'm quite new to IntelliJ IDEA but not to IDEs in general, and I'm quite new to Git, but not to VCSs in general, and I'm quite new to Java, but highly experienced in other, similar languages...
...so I may be missing something really obvious here.
I've recently added my project into Github.
When I create a new repository on either the same or a different machine, all the build/run/test configurations disappear from the drop-down and I have to recreate them.
I've tried searching the documentation but I haven't found anything that explains what these configs belong to. I would expect that they belong to the project (or maybe module??) so they'd get checked into Get when the *.iml files and .idea folders were checked in.
I've tried searching in my (working) repo for the names of build configurations and they only seem to be mentioned in workspace.xml. I have found instructions _not_ to check that in, as it is per-user settings. So later I will drop that from the repo but I'm trying to to fix one thing at a time and this configs problem seems more fundamental...
I am using 14.1.5 on Windows 7 and Windows 10. I just created the initial repo using the VCS -> Import into version control -> Github
Thanks,
Ian
Please sign in to leave a comment.
I marked this a question, I don't really know the significance of doing that but it seemed broadly appropriate...
See https://intellij-support.jetbrains.com/entries/23393067 and http://stackoverflow.com/a/3136255/104891 .
Make your configurations Shared and add .idea/runConfigurations into Git.
A-ha! I did wonder about that setting, but my first guess was that it was about sharing between projects, and the help page I thought relevant didn't mention it, where the help page that mentioned it I hadn't thought relevant.
Thanks Serge!
Ian
Serge Baranov's answer is wrong. The runConfigurations folder exists in the .idea folder of the "main" project i.e. "workspace". That is, if you create a project "foo" and then create project "bar" using the options "open in current window" and "add to currently opened projects", then you will effectively create a "workspace", and the chronologically first project in it ("foo") will be the one that will store the shared run configurations for ALL projects in the workspace. If you want to have per-project git repositories, then you have no way of storing the per-project run configurations in git.
IntelliJ project can have only one .idea project configuration folder. So yes if you add a project (the module in IntelliJ terms) to an existing project then it's configuration will be saved in the .idea folder of the existing project.
Related request: https://youtrack.jetbrains.com/issue/IDEA-55502.