保护 Visual Studio Team Services 中的 git 分支 [英] Protecting a git branch in Visual Studio Team Services

查看:22
本文介绍了保护 Visual Studio Team Services 中的 git 分支的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只希望明确允许开发人员合并到主"分支.我找到了安全设置的位置,但似乎没有什么能让我说那个分支,只允许 Rob 合并到它里面".请问有什么具体指导吗?

I would like only explicitly permitted developers to merge into a 'master' branch. I've found the location of the security settings but nothing seems to allow me to say 'that branch, only allow Rob to merge into it'. Any specific guidance please?

推荐答案

您可以非常轻松地保护 VSTS 中的 MASTER,因为 TFS 提供了企业 Git 功能.有两种方法可以实现这一点.

You can protect MASTER in VSTS pretty easily as TFS provides enterprise Git capabilities. There are two ways to achieve this.

在版本控制选项卡下的管理页面中,您可以更改每个已发布分支的权限.您需要在 repo 级别保持访问权限,但是在 MASTER 上您可以更改贡献者"提交权限未配置".然后你可以只添加 Rob...

In the administration pages under the Version Control tab you can change permission for each published branch. You need to maintain access at the repo level, however on MASTER you can change "Contributor" commit permission to "not configured". You can then add only Rob...

哦...总是使用未设置"而不是拒绝"因为拒绝总是覆盖.

Oh... Always use "not set" rather than "deny" as deny always overrides.

VSTS 引入了分支策略的概念.这些分支策略可以应用于任何分支,但传统上应用于 MASTER.

VSTS has introduces the idea of Branch Policies. These Branch Policies can be applied to any branch but are traditionally applied to MASTER.

在这里您可以应用多个策略来反映您的需求...我总是设置

Here you can apply multiple policies to reflect you needs... I always set

这篇关于保护 Visual Studio Team Services 中的 git 分支的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆