Repository administrators can enable protected branches for limiting branch manipulation.

  1. On GitHub, 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. Click Save changes.

Further reading