如何防止 TFS 中的合并
我有一个父项目,它分支到许多依赖的子项目。 我不想允许子项目中的更改合并回父项目中。 即我只想允许单向合并(父级到子级)。
我该如何实现这个目标?
I have a parent project that is branched to many dependent child projects. I do not want to allow changes in the child projects to be merged back into the parent. i.e. I only want to allow a 1 way merge (parent to child).
How do I accomplish this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
最简单的方法是只授予父分支读取权限。 要合并,您需要签出/签入,因此如果没有这些权限,则无法从子级合并到父级。 不过,他们仍然能够从父级合并到子级。
Easiest way is to only grant read permissions to the parent branch. To merge you need to check-out/in so without these permissions it's not possible to merge from child to parent. They will still be able to merge from parent to child though.
如果您无法像 William Bartholomew 建议的那样设置安全权限 - 另一种方法是编写自定义签入策略。 问题在于它可以被覆盖(但发生这种情况时您可能会收到通知)
If you can't set security permissions as William Bartholomew suggests - another approach would be to write a custom check-in policy. The problem with this is that it CAN be overriden (but you could receive notifications when that occurs)