Do you check your .idea directories and .iml files into source control?

I'm partly being lazy not to just try it, but mostly being conservative about consequences I might not know about until later.

Do you check your IDEA project and module files into source control? Do they work correctly on a different machine with a different topology, or in a different file system location on the same box?

So far, I'm the only one here using IDEA, but it'd still be useful to check out source to a new location (different environments), and have my project, modules, favorites, etc already set up. Once other people are using it, it might get either more valuable, or harder to manage, or both.

Thanks,
Dave

5 comments
Comment actions Permalink

Yes, and in general it works fine.
(There are some minor topics to be aware of. For example application servers need to be configured on each developer's own copy of IDEA. When doing so everybody needs to use the same name, because it's this name that is referenced in the project file.)

See http://devnet.jetbrains.net/docs/DOC-1186

0
Comment actions Permalink

Sharing IDE config files is like sharing a wife. You can do it, but it will probably end up badly.

Seriously, whenever I go into revision control and see netbeans/eclipse/idea files, the first thing I do is remove them. Then I hunt down the dev who checked them in and ask them to keep their dirty laundry out of my nice clean dresser.

Sean

1
Comment actions Permalink

So if you check out code to a new box or location, you have to set up your project again? For example, I have different back end environments on my machine, and if I have an issue that affects one particular one, I'll usually check out code there, resolve it, and promote. It's unfortunate to have to set up the project in each of the environment.

What sorts of problems have you run into? Were you using anything like the recommendations posted earlier?

Thanks,
Dave

0
Comment actions Permalink

Yes, if I have a new machine or work environment, I have always just checked out and recreated the project. However all our Java projects are typically maven or occasionally ant projects, and this has been pretty painless in Eclipse. It hasn't hurt in IntelliJ yet either.

If I did have a bunch of very configurations that could stand being on different environments without pain, I'd just copy them over separately. If I really really wanted it in the revision control, I'd tar/zip them up as something like sean-settings.tar so that there was no risk of conflict with onyone else. I would not impose my project configuration on anyone else. If you want to have your tabs set to 8 instead of 3, you should be able to do that. (Just make sure you apply project standards before you commit) :-)

Fairly new to IntelliJ, but I used to have endless problems when the Windows guys would check in their Eclipse .settings which would conflict with mine (Windows vs Linux).This was a PITA first with revision control, which would want a merge, and then a problem when Eclipse found a reference to C:\blah\blah on a Linux or Mac. Also, you may have noticed that everyone else does everything wrong. They use the wrong port for Tomcat, their Run Configurations are wrong, they have the wrong font in their editor. This is all their perogative on their own machines, but not on mine. I say this tongue-in-cheek, but I'm sure you get my point.

The bottom line is that these configurations are personal. Checking them in serves your interest, but not necessarily anyone else's.

Sean

0
Comment actions Permalink

Pretty knew to IDEA myself, and I haven't tried any of this, but my read of the referenced artice is that some configs are per user and some are per project. The article recommends sharing only the project ones, and details which to include and exclude. No idea how well that works to avoid conflicts etc.

Dave

0

Please sign in to leave a comment.