How can I restrict access to a branch?
Restricting user access to a branch means that only selected users will be allowed to push to it. To restrict branch access to certain members, or teams navigate to the “ Settings” tab in your repo, then to "Permissions".
Then click “restrict access to a branch” at the bottom of the page.
To restrict a user to one branch, uncheck the checkbox to the left of their name and submit the form using the “ Restrict Access” button.