Which eclipse files belong under Version Control
Which eclipse files is it appropriate to put under source control, aside from the sources obviously. In my project, specifically, I'm wondering about:
.metadata/* project-dir/.project project-dir/.classpath project-dir/.settings/*
If there are any of these for which is depends, please explain your guidelines.
Metadata should not be managed in source control, they contain mostly data relevant to your workspace.
The only exception is the .launch xml files (launcher definition).
They are found in
And should be copied into your project directory: when your project is refreshed, those configurations will be displayed in the "Run configuration" dialog. That way, those launch parameter files can be also managed into the SCM.
(Warning: do uncheck the option "Delete configurations when associated resource is deleted" in the Run/Launching/Launch Configuration preference panel: it is common to soft-delete a project in order to import it back again - to force a reinitialization of the eclipse metadata. But this option, if checked, will remove your detailed launch parameters!)
project-dir/.project project-dir/.classpath project-dir/.settings/*
should be in your SCM (especially .project and .classpath according to the eclipse docs).
The goal is that anyone can checkout/update his/her SCM workspace and import the eclipse project into the eclipse workspace.
For that, you want to use only relative paths in your .classpath, using linked resources.
Note: it is better if project-dir refers to an "external" project directory, not a directory created under the eclipse workspace. That way, the two notions (eclipse workspace vs. SCM workspace) are clearly separated.
As ipsquiggle mentions in the comment, and as I have alluded to in an old answer, you can actually save the launching configuration as shared file directly in your project directory. All launching configuration can then be versioned like the other project files.
(From the blog post Tip: Creating and Sharing Launch Configurations from KD)