是否可以从检入(TFS)中排除某些文件?

发布于 2024-08-20 20:48:35 字数 301 浏览 6 评论 0原文

我们在源代码控制 (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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

-柠檬树下少年和吉他 2024-08-27 20:48:35

您的主要选择:

还有一些其他方法,但我认为这些显然是最受欢迎的。

Your primary options:

There are a few other ways but I think these are the clear favorites.

残花月 2024-08-27 20:48:35

您还可以使用阻止某些文件名的签入策略。

不过,我认为这比仅仅将文件标记为“已排除”要逊色一些。

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.

茶色山野 2024-08-27 20:48:35

“从源代码管理中排除”选项仅适用于 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文