Home > Mobile >  GitHub contributor acess to one branch only
GitHub contributor acess to one branch only

Time:10-22

I have a project with 8 branches that maintain different features and a group of contributors, divided on groups by each feature. Is there any way to give certain users acess to write only on certain branch and restrict on others?

I've only managed to restrict acess to everyone on main branch using branch protection rule.

CodePudding user response:

The answer depends on your git hosting service.

Bitbucket Cloud (i.e. bitbucket.org) allows you to set Branch Restrictions that can restrict writing of certain branches to certain named user accounts (along with other branch restrictions).

Github's Branch Protection Rules do not seem to offer similar per-user branch restrictions, the same branch protection rules apply to all collaborators with repository write permissions.

  • Related