[英]Do I commit ProjectA or ProjectA/src to SVN?
In Java
, I've been recommended not to commit the bin
folder (with .class
files), the lib
folder (for external Jar files) or the .project
or .classpath
files. 在
Java
,我建议不要提交bin
文件夹(带.class
文件), lib
文件夹(用于外部Jar文件)或.project
或.classpath
文件。
This would leave src
(source code) and test
(unit tests). 这将留下
src
(源代码)和test
(单元测试)。
Given this, is it best practice to instantiate on the SVN repository separately ProjectA/src
and ProjectB/test
, thus creating two .svn
folders in these two folders? 鉴于此,最好的做法是在SVN存储库上单独实例化
ProjectA/src
和ProjectB/test
,从而在这两个文件夹中创建两个.svn
文件夹? Or would I still only ever instantiate the entire ProjectA
first off? 或者我是否仍然只会首先实例化整个
ProjectA
?
Tests are an integral part of the ProjectA project, and you definitely want them in the same repository as the sources that they test. 测试是ProjectA项目不可或缺的一部分,您肯定希望它们与它们测试的源位于同一个存储库中。
And you probably have (or will have) other directories in your project (documentation, build file, scripts, etc.). 而且您可能已经(或将拥有)项目中的其他目录(文档,构建文件,脚本等)。 So put the project root directory under SVN, and make sure to ignore the
bin
directory. 所以将项目根目录放在SVN下,并确保忽略
bin
目录。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.