Commit 34c2d468 authored by Tristan Williams's avatar Tristan Williams Committed by Rebecca Dodd

Update keeping-your-code-protected blog post

parent f1d18645
......@@ -38,7 +38,7 @@ In our experience, this covers almost all cases and can be fitted to any organis
- Guest - No access to code
- Reporter - Read the repository
- Developer - Read/Write to the repository
- Master - Read/Write to the repository + partial administrative capabilities
- Maintainer - Read/Write to the repository + partial administrative capabilities
- Owner - Read/Write to the repository + full administrative capabilities
The permissions are named to reflect their purpose. A user with the lowest private permission _Guest_
......@@ -64,17 +64,19 @@ nor do they help with collaboration: anyone can (force) push to any branch (such
To stop people from messing with history or pushing code without review, we've created **protected branches**. A protected branch does three simple things:
- it prevents pushes from everybody except users with Master permission
- it prevents pushes from everybody except users with Maintainer permission
- it prevents _anyone_ from force pushing to the branch
- it prevents _anyone_ from deleting the branch
You can make any branch a protected branch. We make the master branch a protected branch by default, but you can turn that off.
[![protected branches in GitLab](/images/protected_branches.png)](/images/protected_branches.png) ***We use protected branches on the [GitLab repository](https://gitlab.com/gitlab-org/gitlab-ce) to protect our release branches***
[![protected branches in GitLab](/images/protected_branches.png)](/images/protected_branches.png)
***We use protected branches on the [GitLab repository](https://gitlab.com/gitlab-org/gitlab-ce) to protect our release branches***
Now, if you want to contribute code to a protected branch as a developer, you can simply push your feature branch and **create a merge request** towards the protected branch. History is protected and the code gets reviewed before it's merged.
Note that even _Master_ is not able to force push to or delete a protected branch. We believe in a simple solution:
Note that even _Maintainer_ is not able to force push to or delete a protected branch. We believe in a simple solution:
> Do not let anyone change the history of a shared branch. Revert changes in the present.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment