我们可以在Azure DevOps中锁定文件吗? [英] Can we lock a file in Azure DevOps?
问题描述
我知道我们可以在Azure Repos中锁定分支,以便用户无法将更改推送到该分支.我们可以将一个特定的文件锁定在分支中,以便其他用户无法更改它吗?
I know that we can lock a branch in Azure Repos so that users can't push changes to it. Can we lock a particular file inside the branch so that it cannot be changed by other users?
还是可以在Visual Studio-团队资源管理器中完成?我当前的源代码控制插件是Git.
Or can this be done in visual studio - team explorer? My current source control plugin is Git.
推荐答案
您可以锁定分支,需要审阅者,将要锁定的文件的用户自动添加为锁定的审阅者.修改(在自动包括代码审阅者"下),并将策略设置为必需".
You could lock the branch, require reviewers, automatically add the user responsible for the file you want locked as a reviewer when the file is modified (under "automatically include code reviewers"), and set the policy as "required".
这样,在没有负责文件批准的用户批准的情况下,包括对锁定的更改在内的任何拉取请求都无法接受.
That way no pull request including a change on the locked file can be accepted without the user responsible for the file approving it.
这篇关于我们可以在Azure DevOps中锁定文件吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!