<p>The <a href="https://docs.gitlab.com/ee/user/permissions.html" rel="nofollow noreferrer">definition of the role &quot;developer&quot;</a> is a contributor that can create branches. If you don't want this permission, you'll have to revoke that role.</p>
<p>Anyone with visibility to the project can pull from it including Guests and Reports (which are inferior roles). A &quot;developer&quot; is a &quot;role&quot; that carries the permission of &quot;Create new branches&quot;, &quot;Force push to non-protected branches&quot;.</p>

CC BY-SA 4.0
2024-01-08T18:09:15.517Z
2024-01-08T18:09:15.517Z
Evan Carroll
<p>My company wants to create a policy where only one person can create a new branch, and not every developer on a project. The only method of contribution that they want is merge-requests. How can we accomplish this?</p>

CC BY-SA 4.0
2024-01-09T01:38:25.523Z
What is the actual *goal?* You can stop people from committing directly to the default branch (meaning everything has to go via a MR) without disabling branches.
l0b0
CC BY-SA 4.0
2024-01-09T04:00:00.387Z
I was very clear about the goal @l0b0, _"create a policy where only one person can create a new branch, and not every developer on a project"_ that means developer Joe that contributes to the project via MR can not push up random branch "my-200gb-tar-archive". I don't want to stop people from committing directly to just the default branch, I want to stop people from **creating new branches**
Evan Carroll
CC BY-SA 4.0
2024-01-09T05:22:25.257Z
Oh, OK, you're talking about people you don't trust. That's very different from developers in your company, I hope.
l0b0
CC BY-SA 4.0
2024-01-09T14:32:13.837Z
@l0b0 it's not about trust, it's about policy. Our policy is all contributions to the repo must be subject to peer review. Developers being able to contribute code to the repo without peer review is a violation of that policy.
Evan Carroll
<gitlab>
How do I stop all users from creating branches on GitLab and force Merge Requests?
Evan Carroll
# How do I stop all users from creating branches on GitLab and force Merge Requests?

(Asked by: username_0 on 2024-01-08)

My company wants to create a policy where only one person can create a new branch, and not every developer on a project. The only method of contribution that they want is merge-requests. How can we accomplish this?

**Tags:** gitlab

> **Comments:**
> **username_1**: What is the actual *goal?* You can stop people from committing directly to the default branch (meaning everything has to go via a MR) without disabling branches.  
> **username_0**: I was very clear about the goal @username_1, _"create a policy where only one person can create a new branch, and not every developer on a project"_ that means developer Joe that contributes to the project via MR can not push up random branch "my-200gb-tar-archive". I don't want to stop people from committing directly to just the default branch, I want to stop people from **creating new branches**  
> **username_1**: Oh, OK, you're talking about people you don't trust. That's very different from developers in your company, I hope.  
> **username_0**: @username_1 it's not about trust, it's about policy. Our policy is all contributions to the repo must be subject to peer review. Developers being able to contribute code to the repo without peer review is a violation of that policy.  

---

## 1 answers

### Answer by username_0 on 2024-01-08. Score: 1 | Accepted answer

The [definition of the role "developer"](https://docs.gitlab.com/ee/user/permissions.html) is a contributor that can create branches. If you don't want this permission, you'll have to revoke that role.

Anyone with visibility to the project can pull from it including Guests and Reports (which are inferior roles). A "developer" is a "role" that carries the permission of "Create new branches", "Force push to non-protected branches".


---

