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

<p>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</p>

CC BY-SA 4.0
2018-11-01T14:19:11.940Z
2018-11-01T14:19:11.940Z
Newtopian
<p>Git does not have branch specific permissions.</p>

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

CC BY-SA 4.0
2018-11-01T12:26:23.090Z
so what's the actual answer to the question?
Pierre.Vriens
CC BY-SA 4.0
2018-11-01T13:26:53.543Z
Thanks for the response! I am using gitlab.com as hosting solution, is gitlab able to manage branch specific permissions?
ptrck
CC BY-SA 4.0
2018-11-02T03:48:07.970Z
https://docs.gitlab.com/ee/user/project/protected_branches.html

Only in enterprise edition. But follow the link above.
Meiram Chuzhenbayev
CC BY-SA 4.0
2018-11-01T12:02:27.303Z
2018-11-01T12:52:48.430Z
2018-11-01T12:52:48.430Z
Meiram Chuzhenbayev
<p>I am currently working on a LaTeX template. I chose gitlab to host the template.</p>

<p>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.</p>

<p>Is it possible to set the master branch to public while the other branches remain private?</p>

<git><gitlab><configuration>
How to make one branch public while the others remain private on GitLab?
ptrck
# How to make one branch public while the others remain private on GitLab?

(Asked by: username_0 on 2018-11-01)

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?

**Tags:** git, gitlab, configuration


---

## 2 answers

### Answer by username_1 on 2018-11-01. Score: 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


---

### Answer by username_2 on 2018-11-01. Score: 0

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.

> **Comments:**
> **username_3**: so what's the actual answer to the question?  
> **username_0**: Thanks for the response! I am using gitlab.com as hosting solution, is gitlab able to manage branch specific permissions?  
> **username_2**: https://docs.gitlab.com/ee/user/project/protected_branches.html  Only in enterprise edition. But follow the link above.  

---

