Explore by product
GitHub
This version of GitHub Enterprise was discontinued on 2021-06-09. 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.
Article version: Enterprise Server 2.21
Article version: Enterprise Server 2.21
Defining the mergeability of pull requests
You can require pull requests to pass a set of checks before they can be merged. For example, you can block pull requests that don't pass status checks or require that pull requests have a specific number of approving reviews before they can be merged.
Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server.
About protected branches→
You can protect important branches by setting branch protection rules, which define whether collaborators can delete or force push to the branch and set requirements for any pushes to the branch, such as passing status checks or a linear commit history.
Managing a branch protection rule→
You can create a branch protection rule to enforce certain workflows for one or more branches, such as requiring an approving review or passing status checks for all pull requests merged into the protected branch.
Troubleshooting required status checks→
You can check for common errors and resolve issues with required status checks.