Is there a way to avoid deleting a branch in Azure DevOps without obliging pull requests?

huangapple go评论62阅读模式
英文:

Is there a way to avoid deleting a branch in Azure DevOps without obliging pull requests?

问题

在Azure DevOps中,配置分支策略可以确保分支不会被删除。然而,这也要求使用拉取请求来对该分支进行更改。

目前我们还没有使用拉取请求,但我们仍然希望防止某些分支被删除。

除了分支策略之外,是否有其他方法可以实现这一点?

英文:

In Azure DevOps, configuring a branch policy ensures the branch cannot be deleted. However this also obliges to use pul requests to make changes to that branch.

Currently we are not using pull requests yet, but we still would like to prevent certain branches from getting deleted.

Is there a way to do that other than branch policy?

答案1

得分: 0

如果您禁用了“Force Push”权限,将阻止用户删除分支。

“Force Push”权限...

可以强制更新分支、删除分支以及修改分支的提交历史。还可以删除标签和注释。

有关这些权限的更多信息,请参阅Microsoft Learn上的详细内容

感谢fenton答案

英文:

If you disable the "Force Push" permission, it will block users from deleting the branch.

The "Force Push" permission...

> Can force an update to a branch, delete a branch, and modify the commit history of a branch. Can delete tags and notes.

See more on these permissions on Microsoft Learn.

Thx fenton for answer.

huangapple
  • 本文由 发表于 2023年5月25日 20:20:59
  • 转载请务必保留本文链接:https://go.coder-hub.com/76332214.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定