views:

1301

answers:

1

Do you have a good ignore pattern for svn, git, etc. that handles an eclipse workspace? I want to version handle all projects in the workspace. It has to ignore all the eclipse configuration, compiled files, and output folders.

+3  A: 

You should be able to ignore just the top level workspace directory. What are you trying to accomplish?

Basically, in the directory above your workspace, do this:

svn propset svn:ignore "<your_workspace_dir>" .

Since what you want is to ignore more specific resources within the project, you want something like this (you can set it using svn prop_edit_ svn:ignore <project_dir>):

.project
.classpath
.settings
bin

In standard Eclipse JDT projects (with separate source and build trees) that will exclude the things that it outputs. Of course, this will differ slightly for things like CDT projects, ruby, &c. YMMV, etcetera.

My general practice is to manually version everything I need versioned, and then exclude whatever is left. Wildcards are dangerous for ignores; they can easily keep you from noticing something critical, so err on the side of caution and ignore only the bare minimum.

Chris R
expanded the question a bit. I'm concerned about ignore pattern not handling wildcards the way I want to.
Spoike