eclipse特定设置应该是源代码存储库的一部分

时间:2013-03-09 05:42:28

标签: eclipse

将eclipse特定设置添加为源代码存储库的一部分是否有意义

   (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

1 个答案:

答案 0 :(得分:1)

是的,您也想提交这些设置文件。否则,在执行结帐时,您将获得相同的项目内容,但会在不同的设置下编译它们。所以你不再拥有一个独立的可再生项目了。

示例:如果在项目的Java设置中设置了Java 1.5的编译器合规级别(位于org.eclipse.jdt.core.prefs中)并且您没有提交它们,那么其他人可能会检查项目,在代码中引入一些Java 6语言特性,它可以在他的机器上运行,但是在获取更改后你会遇到编译错误。