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

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

问题描述

我只想明确允许的开发人员合并成一个'主'分支。我找到了安全设置的位置,但似乎没有任何东西可以让我说'那个分支,只允许Rob融入它。'任何具体的指导请求?

解决方案

您可以很容易地保护VSTS中的MASTER,因为TFS提供企业Git功能。有两种方法可以达到这个目的。

1)Git分支权限



在版本下的管理页面控制选项卡,您可以更改每个发布的分支的权限。您需要在回购层面维护访问权限,但是在MASTER上,您可以将参与者提交权限更改为未配置。然后你可以只添加Rob ...





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



2)Git分支策略



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



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

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?

解决方案

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

1) Git Branch Permissions

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.

2) Git Branch Policies

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天全站免登陆