是否可以从检入(TFS)中排除某些文件?
我们在源代码控制 (TFS) 下的各种项目中使用配置文件,每个开发人员都必须在其本地副本中进行一些调整来配置其环境。作为部署的一部分,构建过程负责将配置文件替换为服务器配置,因此存储库中的内容实际上并不重要。然而,我们无论如何都希望在存储库中保留某种默认的不间断版本的配置文件,这样,未参与特定项目的人就不会因为本地配置错误而遇到麻烦。
我们尝试通过引入简单地禁止签入配置文件的签入策略来解决此问题。这工作得很好,但只是因为我们懒得总是取消选中挂起的更改窗口中的那些复选框,所以问题来了:是否可以透明地禁用特定文件的签入而不使它们脱离源代码控制(例如锁定它们)当前版本)?
We use configuration files within various projects under source control (TFS), where each developer has to make some adjustments in his local copy to configure his environment. The build process takes care about replacing the config files with the server configuration as a part of the deployment, so it doesn't actually matter what is in the repository. However, we would anyway like to keep some kind of a default non-breaking version of config files in the repository, so that e.g. people not involved in the particular project won't run into troubles because of local misconfiguration.
We tried to resolve this by introducing the check-in policy that simply forbids to check-in the config files. This works fine, but just because we're lazy to always uncheck those checkboxes in the pending changes window, the question comes : is it possible to transparently disable the check-in of particular files without keeping them out of source control (e.g. locking their current version) ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您的主要选择:
还有一些其他方法,但我认为这些显然是最受欢迎的。
Your primary options:
There are a few other ways but I think these are the clear favorites.
您还可以使用阻止某些文件名的签入策略。
不过,我认为这比仅仅将文件标记为“已排除”要逊色一些。
You could also use a check-in policy that blocks certain file names.
I think this would be less preferable than just marking the file as "Excluded", though.
“从源代码管理中排除”选项仅适用于 Web 应用程序,不适用于网站项目类型。我们使用网站,但我还没有找到解决方案。
The option to "Exclude From Source Control" only works for Web Applications and not for Website Project types. We use Websites and I haven't found a solution to this yet.