0

I have a private repository where there are multiple branches and we are using continuous deployment on a specific master branch. I have couple of resources who works on this repository and have been added a collaborate with Write Access on this specific repository. I would like those user not to be able to access or use one specific branch that is master but can still create different feature branches and work as usual to other branches and also create there own from this repository.

I want to just restrict one specific master branch to just have access to one user and not all who are added as a collaborator with write access to this repository.

Any help is appreciated.

Regards

  • 2
    What do you mean "access" - If you mean read access, then that's not possible; use a different private repo. If you mean write access, the settings would be on your particular hosting solution's site (e.g. GitLab) repo admin settings under "protected branches". See [this answer](https://stackoverflow.com/a/48029904/237955). – amphetamachine Jan 30 '23 at 17:15
  • I meant Write Access basically. I will go over the link – user1087769 Jan 30 '23 at 18:13

1 Answers1

0

Found a Branch protection option on GitHub under Setting-->Branches which is what i was looking to do.