Sam
Sam

Reputation: 8693

Should eclipse specific settings be part of source code repository

Does it make sense to add eclipse specific settings as part of source code repository

   (use "git add <file>..." to include in what will be committed)
#
#   ivr/.classpath
#   ivr/.project
#   ivr/.settings/
no changes added to commit (use "git add" and/or "git commit -a")

sam@dell:~/work$ ls ivr/.settings/
org.eclipse.jdt.core.prefs        org.eclipse.wst.common.project.facet.core.xml
org.eclipse.wst.common.component

Upvotes: 1

Views: 69

Answers (1)

Bananeweizen
Bananeweizen

Reputation: 22070

Yes, you want to commit these settings files, too. Otherwise, when doing a checkout, you get the same project contents, but will compile them under different settings. So you don't have a self-contained reproducable project anymore.

Example: If you set a compiler compliance level of Java 1.5 in the Java settings of the project (which are in org.eclipse.jdt.core.prefs) and you do not commit them, then someone else might checkout the project, introduce some Java 6 language features in the code and it will work on his machine, but you will get compile errors after fetching his changes.

Upvotes: 1

Related Questions