文章版本: Enterprise Server 2.17
关于分支限制
属于组织的仓库内的分支可配置为只允许特定用户或团队推送到该分支。
受保护分支适用于具有 GitHub Free 和组织的 GitHub Free 的公共仓库,以及具有 GitHub Pro、GitHub Team、GitHub Enterprise Cloud 和 GitHub Enterprise Server 的公共和私有仓库。 限制分支是一种适用于组织在 GitHub Team、GitHub Enterprise Cloud 及 GitHub Enterprise Server 中拥有的公共和私有仓库的保护。
When you enable branch restrictions, only users or teams that have been given permission can push to the protected branch. For more information, see "Enabling branch restrictions" and "About protected branches." You can view and edit the users or teams with push access to a protected branch in the protected branch's settings.
您只能将推送到受保护分支的权限授予具有仓库写入
权限的用户或团队。
具有仓库管理员权限的人员始终可以推送到受保护分支。
Note: If "Include administrators" is selected, you've enabled required status checks on the branch, and if any status checks fail, any attempt to push changes to the protected branch will also fail, even for people with admin permissions. For more information, see "Enabling required status checks."