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. 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 mark protected using the drop-down menu. Selecting a protected branch drop-down menu

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

Further reading