Repository administrators can enable protected branches for limiting branch manipulation.
On GitHub Enterprise, navigate to the main page of the repository.
In the repository's right sidebar, click Settings.
In the left menu, click Branches.
Under Protected Branches, select the branch you want to mark protected using the drop-down menu.
- Select Protect this branch.
- Click Save changes.