对组织拥有的仓库具有管理员权限的任何人都可以启用分支限制。
您可以自动为仓库中的部分或所有分支设置实施受保护分支设置。 更多信息请参阅“配置受保护分支”。
- 在 GitHub 上,导航到仓库的主页面。
- 在仓库名称下,单击 Settings(设置)。

- 在左侧菜单中,单击 Branches(分支)。

- 在“Branch protection rules(分支保护规则)”旁边,单击 Add rule(添加规则)。

- 在“Branch name pattern(分支名称模式)”下,输入您要保护的分支名称或模式。

- 视情况可选择 Include administrators(包括管理员)。 这将强制执行所有配置的仓库管理员限制。

- 在“Protect matching branches(保护匹配分支)”下,选择 Restrict who can push to matching branches(限制可推送到匹配分支的人员)。

- Search for and select the people, teams, or apps who will have permission to push to the protected branch.

- 单击 Create(创建)。

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.
