If you're a repository owner or have admin permissions in a repository, you can customize branch protections in the repository and enforce certain workflows, such as requiring more than one pull request review or requiring certain status checks to pass before allowing a pull request to merge.

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

  2. Repository settings buttonUnder your repository name, click Settings.

  3. Repository options sub-menuIn the left menu, click Branches.

  4. Selecting a protected branch drop-down menuUnder "Protected branches", select the branch you want to mark protected using the drop-down menu.

  5. Protecting branch checkboxSelect Protect this branch.
  6. Optionally, you can configure specific branch protections.
  7. To confirm the protected branch settings, click Save changes.

Further reading