英文:
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上的详细内容。
英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论