Lets assume I have a GitHub repository with the following branches: Branch1
to Branch10
.
I want to give a collaborator, let’s call him user1
, access to only branch5
and deny access to all other branches. Is it possible to configure GitHub permissions in such a way that user1
can push changes only to branch5
and is restricted from pushing to any other branches?
I also want to know, how and from where I can define a role and assign it to user1
.
I assume there are no custom roles and some combination of Read, Triage, Write, Maintain, Admin are allowed.
Additionally, are there any best practices or alternative approaches to achieve this level of access control within a GitHub repository?