How to restrict access to master branch on git

后端 未结 3 1770
梦谈多话
梦谈多话 2020-11-27 12:20

I have a single repo in which I have 2 user groups:

  • Admins
  • HTML/UI Developers

I do not wish to give read/write access of my maste

3条回答
  •  悲哀的现实
    2020-11-27 12:45

    Addition to @1615903's answer, you can protect a branch in Azure DevOps like below:

    Using Azure DevOps

    In Azure DevOps, protecting a branch with security permissions and policies which allow you can do the following:

    • Add or remove users and groups to a specific branch.
    • Declare a minimum number of reviewers for pull requests.
    • Automatically include code reviewers
    • Automatically check linked work items is required or optional
    • Check for comment resolution
    • Enforce a merge strategy(No-fast-forward or squash)
    • Build validation

    and more detailed information on the docs page.

    To protect the branch:

    1. Select Repos > Branches in the project's main page to open the Branches.
    2. Locate your branch on the page in which all branches are listed.
    3. Select the ... button. Then select Branch policies or Branch security from the context menu.
    4. Once you have done, select Save changes to apply your new policy configuration.

提交回复
热议问题