Article version: Enterprise Server 2.13

This version of GitHub Enterprise will be discontinued on This version of GitHub Enterprise was discontinued on 2019-03-27. No patch releases will be made, even for critical security issues. For better performance, improved security, and new features, upgrade to the latest version of GitHub Enterprise. For help with the upgrade, contact GitHub Enterprise support.

Enabling branch restrictions

Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. The ability to restrict branches is a type of branch protection that's available for public and private repositories owned by organizations in GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server.

Organization owners and people with admin permissions for organization-owned repositories can enforce branch restrictions so that only certain users or teams are able to push to a protected branch.

Enabling branch restrictions

  1. On GitHub Enterprise, navigate to the main page of the repository.

  2. Under your repository name, click Settings.

    Repository settings button

  3. In the left menu, click Branches.

    Repository options sub-menu

  4. Under Protected Branches, select the branch you want to restrict using the drop-down menu.

    Selecting a protected branch drop-down menu

  5. Select Restrict who can push to this branch.

    Branch restriction checkbox

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

    Branch restriction search

  7. Click Save changes.

Further reading

Ask a human

Can't find what you're looking for?

Contact us