开发人员将其 NAnt.exe.config 文件保留在版本控制中是否常见?
开发人员将其 NAnt 全局配置文件 (NAnt.exe.config) 保留在版本控制中是否常见?
NAnt 安装中的其余文件是否应该添加到版本控制系统的忽略文件中?
Is it common for a developer to keep their NAnt global configuration file (NAnt.exe.config) in version control?
And should or shouldn't the the rest of the files in the NAnt installation be added to the ignore file of the version control system?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
版本控制的一种用途是作为备份。如果
NAnt.exe.config
的唯一副本位于损坏的硬盘上,则需要花费一些精力来重建它(以及消失且未备份的所有其他内容)。从公司的角度来看,备份所有正在进行的工作是保护资产的一种方法。源代码资产的企业所有者确信该资产不会被破坏。
当有另一种备份策略时,有时经验法则是不要将任何不应与其他开发人员共享的内容放入版本控制中。例如仅与一个用户和/或机器相关的定制数据,或机密信息。
One use of version control is as a backup. If the only copy of
NAnt.exe.config
is on a hard disk that dies, it will take some effort to reconstruct it (along with everything else that disappeared and wasn't backed up).From the corporate perspective, having all of the work in progress backed up is a method for preserving assets. The corporate owner of the source code asset is assured that the asset will not be destroyed.
When there is another backup strategy, then sometimes the rule of thumb is not to put anything into version control that should not be shared with other developers. Such as customized data relevant only to one user and/or machine, or confidential information.
我保留了我正在使用的版本的 NAnt 代码的副本。这包括 .config 文件。这样我的构建系统就不会受到“它从互联网上消失”事件的影响(不太可能,但仍然如此)。
除此之外,我认为没有理由将其保留在您的代码存储库中,除非由于某种原因您以某种方式修改了它。 NAnt 中的大多数内容都可以在构建文件中覆盖,例如目标框架等。
I keep a copy of the NAnt code for the version I'm using. This includes the .config file. This is so my build system is safe from "it disappeared from the internet" events (unlikely, but still).
Beyond that I see no reason to keep it around on your code repository, unless for some reason you've modified it somehow. Most everything in NAnt can be overridden in build files, like the target framework and so on.