Answers: <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>
  
Answers: CC BY-SA 4.0
Answers: 2024-01-08T18:09:15.517Z
Answers: 2024-01-08T18:09:15.517Z
Answers: Evan Carroll
Body: <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>
  
Comments: CC BY-SA 4.0
Comments: 2024-01-09T01:38:25.523Z
Comments: 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.
Comments: l0b0
Comments: CC BY-SA 4.0
Comments: 2024-01-09T04:00:00.387Z
Comments: 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**
Comments: Evan Carroll
Comments: CC BY-SA 4.0
Comments: 2024-01-09T05:22:25.257Z
Comments: Oh, OK, you're talking about people you don't trust. That's very different from developers in your company, I hope.
Comments: l0b0
Comments: CC BY-SA 4.0
Comments: 2024-01-09T14:32:13.837Z
Comments: @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.
Comments: Evan Carroll
Tags: <gitlab>
Title: How do I stop all users from creating branches on GitLab and force Merge Requests?
UserDisplayName: Evan Carroll
ThreadText: # 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".
  
  
  ---
  
  