什么不应该在源代码控制之下? [英] What should NOT be under source control?
问题描述
最好有一个或多或少完整的列表,列出哪些文件和/或目录不应该(在大多数情况下)受源代码控制.您认为应该排除什么?
It would be nice to have a more or less complete list over what files and/or directories that shouldn't (in most cases) be under source control. What do you think should be excluded?
到目前为止的建议:
一般
- 带有敏感信息(密码,私钥等)的配置文件
- Thumbs.db,.DS_Store和desktop.ini
- 编辑器备份:*〜(emacs)
- 生成的文件(例如DoxyGen输出)
C#
- bin \ *
- obj \ *
- *.exe
Visual Studio
- *.suo
- *.ncb
- *.user
- *.aps
- *.cachefile
- *.backup
- _UpgradeReport_Files
Java
- *.class
Eclipse
我不知道,这就是我现在要寻找的:-)
I don't know, and this is what I'm looking for right now :-)
Python
- *.pyc
临时文件 -.*.sw? -*〜
Temporary files - .*.sw? - *~
推荐答案
生成的所有内容.从XML生成的二进制,字节码,代码/文档.
Anything that is generated. Binary, bytecode, code/documents generated from XML.
从我的评论者中排除:
- 由构建生成的任何内容,包括代码文档(doxygen,javadoc,pydoc等)
但包括:
-
您没有 OR 来源的
- 第三方库不会建立.
FWIW,在我为一个非常大的项目工作时,在ClearCase下有以下内容:
FWIW, at my work for a very large project, we have the following under ClearCase:
- 所有原始代码
- Qt源并构建调试/发布
- (严重过时)规格
我们没有为我们的软件构建模块.每两周分发一次完整的二进制文件,其中包含最新更新.
We do not have built modules for our software. A complete binary is distributed every couple weeks with the latest updates.
这篇关于什么不应该在源代码控制之下?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!