I am currently working on a LaTeX template. I chose gitlab to host the template.

Now I want to give some colleagues access to my template, but only to the master branch. I use the other branches to write my personal documents based on the template.

Is it possible to set the master branch to public while the other branches remain private?

2 Answers 2


I'm not an expert in GitLab but I would assume it to be similar to other solutions like it (bitbucket, github).

A simple way to achieve this would be to clone the repo in another private repo instead of doing a separate branch. In effect this would work similar to having your local repo and the gitlab repo. Merging a branch and merging with another repo is not much different with git


Git does not have branch specific permissions.

For branch specific permissions, you need a server-side authorization layer like Gitolite — obviously, this requires you to be managing your own Git server.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.