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!)


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)

Need Your Help

Run PHP code on button click

php html

What is the best way to just run a PHP script when the user clicks a button? It sends nothing back to the user whatsoever! (The PHP script only sends a PostgreSQL query.)

Flipping image css transformation

jquery html css css3 css-animations

I have two images on top of each other, I'm using CSS transformations to first rotate both the top and bottom image away, then rotate the bottom image back in, creating a flip effect. However, I ca...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.