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.

Now you can select which users you want to give push access. By default, the account owner, admins and users with Read & Write access can push to all branches.

Please Note: Branch restrictions will not prevent users from pulling or viewing protected branches, the feature will only prevent pushes. Account owner and admins can not be restricted from pushing to branches. 

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.

Still need help? Contact Us Contact Us