Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gitlab: Can I create a Branch visible to only certain developers?

Im using gitlab, and I am wondering, is there a simple way to restrict access to a branch to only certain developers? This has to do with time varying disclosure and the ability for certain developers to see some objects models, while other cannot? Ideally this would happen in one repository, without a proliferation of forks.

like image 681
David Williams Avatar asked Mar 17 '23 19:03

David Williams


1 Answers

No, it is not possible to have a read protection to certain git branches. That would also defeat how git works.

What you could do is forking a repository, creating a branch here and only grant restricted permission to the entire repository. Later it would always be possible to merge changes from this forked repository to the original repository.

You can only change read access to the entire repository as well as write permission to branches.

like image 106
volker Avatar answered Mar 19 '23 09:03

volker