美文网首页
GitLab 设置-保护分支

GitLab 设置-保护分支

作者: acc8226 | 来源:发表于2021-01-01 18:25 被阅读0次

    GitLab.com 登录
    Sign in · GitLab
    https://gitlab.com/users/sign_in

    GitLab.com 注册
    Sign up · GitLab
    https://gitlab.com/users/sign_up

    gitlab 修改界面为中文

    Settings --- Preferences --- Localization

    为什么要设计保护分支

    By default, a protected branch does four simple things:

    • It prevents its creation, if not already created, from everybody except users with Maintainer permission.
    • It prevents pushes from everybody except users with Allowed permission.
    • It prevents anyone from force pushing to the branch.
    • It prevents anyone from deleting the branch.

    设置-保护分支

    示例 如果尝试推送指定分支,则会报错,符合预期。

    当然保护分值可以使用通配符,保护一系列的分支

    Two different wildcards can potentially match the same branch. For example, -stable and production- would both match a production-stable branch. In that case, if any of these protected branches have a setting like “Allowed to push”, then production-stable will also inherit this setting.

    两个不同的通配符可能匹配同一个分支。例如,-stable 和 production- 都匹配一个 production-stable 分支。在这种情况下,如果这些受保护的分支中有任何一个具有“ allowedtopush”这样的设置,那么 production-stable 也将继承这个设置。

    参考

    gitlab 修改界面为中文 - 紫枫术河 - 博客园
    https://www.cnblogs.com/liushuhe1990/articles/12594850.html

    Protected branches | GitLab
    https://docs.gitlab.com/ee/user/project/protected_branches.html#wildcard-protected-branches

    相关文章

      网友评论

          本文标题:GitLab 设置-保护分支

          本文链接:https://www.haomeiwen.com/subject/sfyloktx.html