1
0
mirror of synced 2025-12-23 11:54:18 -05:00
Files
docs/content/github/administering-a-repository/enabling-branch-restrictions.md
2020-11-02 15:12:44 -06:00

1.6 KiB

title, intro, product, redirect_from, versions
title intro product redirect_from versions
Enabling branch restrictions You can enforce branch restrictions so that only certain users, teams, or apps can push to a protected branch in repositories owned by your organization. {% data reusables.gated-features.branch-restrictions %}
/articles/enabling-branch-restrictions
free-pro-team enterprise-server github-ae
* * *

Anyone with admin permissions to an organization-owned repository can enable branch restrictions.

{% data reusables.repositories.protected-branches-options %}

{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} {% data reusables.repositories.repository-branches %} {% data reusables.repositories.add-branch-protection-rules %} {% data reusables.repositories.include-administrators %} 6. Under "Protect matching branches", select Restrict who can push to matching branches. Branch restriction checkbox 8. Search for and select the people, teams, or apps who will have permission to push to the protected branch. Branch restriction search 9. Click Create.

Further reading