diff options
author | Achilleas Pipinellis <axilleas@axilleas.me> | 2016-07-15 13:55:25 +0300 |
---|---|---|
committer | Achilleas Pipinellis <axilleas@axilleas.me> | 2016-07-20 09:45:40 +0300 |
commit | 67bed54a6936a3a1658e394de5a6fcd06b822984 (patch) | |
tree | c014df7d5a27184105300ae779d12744e66bee61 | |
parent | a4ca206fd1cc0332d1e385ddbc0f2e4065c3ae73 (diff) |
Move protected_branches.md to new location
-rw-r--r-- | app/views/projects/protected_branches/index.html.haml | 2 | ||||
-rw-r--r-- | doc/user/project/img/protected_branches_devs_can_push.png (renamed from doc/workflow/protected_branches/protected_branches2.png) | bin | 41179 -> 41179 bytes | |||
-rw-r--r-- | doc/user/project/img/protected_branches_matches.png (renamed from doc/workflow/protected_branches/protected_branches3.png) | bin | 110160 -> 110160 bytes | |||
-rw-r--r-- | doc/user/project/img/protected_branches_page.png (renamed from doc/workflow/protected_branches/protected_branches1.png) | bin | 195061 -> 195061 bytes | |||
-rw-r--r-- | doc/user/project/protected_branches.md | 55 | ||||
-rw-r--r-- | doc/workflow/README.md | 2 | ||||
-rw-r--r-- | doc/workflow/protected_branches.md | 56 |
7 files changed, 58 insertions, 57 deletions
diff --git a/app/views/projects/protected_branches/index.html.haml b/app/views/projects/protected_branches/index.html.haml index c243a949571..1ea90377857 100644 --- a/app/views/projects/protected_branches/index.html.haml +++ b/app/views/projects/protected_branches/index.html.haml @@ -23,7 +23,7 @@ = f.label :name, "Branch", class: "label-light" = render partial: "dropdown", locals: { f: f } %p.help-block - = link_to "Wildcards", help_page_path('workflow/protected_branches', anchor: "wildcard-protected-branches") + = link_to "Wildcards", help_page_path('user/project/protected_branches', anchor: "wildcard-protected-branches") such as %code *-stable or diff --git a/doc/workflow/protected_branches/protected_branches2.png b/doc/user/project/img/protected_branches_devs_can_push.png Binary files differindex a4f664d3b21..a4f664d3b21 100644 --- a/doc/workflow/protected_branches/protected_branches2.png +++ b/doc/user/project/img/protected_branches_devs_can_push.png diff --git a/doc/workflow/protected_branches/protected_branches3.png b/doc/user/project/img/protected_branches_matches.png Binary files differindex 2a50cb174bb..2a50cb174bb 100644 --- a/doc/workflow/protected_branches/protected_branches3.png +++ b/doc/user/project/img/protected_branches_matches.png diff --git a/doc/workflow/protected_branches/protected_branches1.png b/doc/user/project/img/protected_branches_page.png Binary files differindex c00443803de..c00443803de 100644 --- a/doc/workflow/protected_branches/protected_branches1.png +++ b/doc/user/project/img/protected_branches_page.png diff --git a/doc/user/project/protected_branches.md b/doc/user/project/protected_branches.md new file mode 100644 index 00000000000..54b0ffb4ecd --- /dev/null +++ b/doc/user/project/protected_branches.md @@ -0,0 +1,55 @@ +# Protected Branches + +Permissions in GitLab are fundamentally defined around the idea of having read or write permission to the repository and branches. + +To prevent 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 anyone from force pushing to the branch +* it prevents anyone from deleting the branch + +You can make any branch a protected branch. GitLab makes the master branch a protected branch by default. + +To protect a branch, user needs to have at least a Master permission level, see [permissions document](../user/permissions.md). + +![protected branches page](img/protected_branches_page.png) + +Navigate to project settings page and select `protected branches`. From the `Branch` dropdown menu select the branch you want to protect. + +Some workflows, like [GitLab workflow](gitlab_flow.md), require all users with write access to submit a Merge request in order to get the code into a protected branch. + +Since Masters and Owners can already push to protected branches, that means Developers cannot push to protected branch and need to submit a Merge request. + +However, there are workflows where that is not needed and only protecting from force pushes and branch removal is useful. + +For those workflows, you can allow everyone with write access to push to a protected branch by selecting `Developers can push` check box. + +On already protected branches you can also allow developers to push to the repository by selecting the `Developers can push` check box. + +![Developers can push](img/protected_branches_devs_can_push.png) + +## Wildcard Protected Branches + +>**Note:** +This feature was added in GitLab 8.10. + +1. You can specify a wildcard protected branch, which will protect all branches matching the wildcard. For example: + + | Wildcard Protected Branch | Matching Branches | + |---------------------------+--------------------------------------------------------| + | `*-stable` | `production-stable`, `staging-stable` | + | `production/*` | `production/app-server`, `production/load-balancer` | + | `*gitlab*` | `gitlab`, `gitlab/staging`, `master/gitlab/production` | + +1. Protected branch settings (like "Developers Can Push") apply to all matching branches. + +1. Two different wildcards can potentially match the same branch. For example, `*-stable` and `production-*` would both match a `production-stable` branch. + >**Note:** + If _any_ of these protected branches have "Developers Can Push" set to true, then `production-stable` has it set to true. + +1. If you click on a protected branch's name, you will be presented with a list of all matching branches: + + ![protected branch matches](img/protected_branches_matches.png) + diff --git a/doc/workflow/README.md b/doc/workflow/README.md index ddb2f7281b1..49dec613716 100644 --- a/doc/workflow/README.md +++ b/doc/workflow/README.md @@ -12,7 +12,7 @@ - [Project Features](project_features.md) - [Project forking workflow](forking_workflow.md) - [Project users](add-user/add-user.md) -- [Protected branches](protected_branches.md) +- [Protected branches](../user/project/protected_branches.md) - [Sharing a project with a group](share_with_group.md) - [Share projects with other groups](share_projects_with_other_groups.md) - [Web Editor](web_editor.md) diff --git a/doc/workflow/protected_branches.md b/doc/workflow/protected_branches.md index 5c1c7b47c8a..aa48b8f750e 100644 --- a/doc/workflow/protected_branches.md +++ b/doc/workflow/protected_branches.md @@ -1,55 +1 @@ -# Protected Branches - -Permissions in GitLab are fundamentally defined around the idea of having read or write permission to the repository and branches. - -To prevent 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 anyone from force pushing to the branch -* it prevents anyone from deleting the branch - -You can make any branch a protected branch. GitLab makes the master branch a protected branch by default. - -To protect a branch, user needs to have at least a Master permission level, see [permissions document](../user/permissions.md). - -![protected branches page](protected_branches/protected_branches1.png) - -Navigate to project settings page and select `protected branches`. From the `Branch` dropdown menu select the branch you want to protect. - -Some workflows, like [GitLab workflow](gitlab_flow.md), require all users with write access to submit a Merge request in order to get the code into a protected branch. - -Since Masters and Owners can already push to protected branches, that means Developers cannot push to protected branch and need to submit a Merge request. - -However, there are workflows where that is not needed and only protecting from force pushes and branch removal is useful. - -For those workflows, you can allow everyone with write access to push to a protected branch by selecting `Developers can push` check box. - -On already protected branches you can also allow developers to push to the repository by selecting the `Developers can push` check box. - -![Developers can push](protected_branches/protected_branches2.png) - -## Wildcard Protected Branches - ->**Note:** -This feature was added in GitLab 8.10. - -1. You can specify a wildcard protected branch, which will protect all branches matching the wildcard. For example: - - | Wildcard Protected Branch | Matching Branches | - |---------------------------+--------------------------------------------------------| - | `*-stable` | `production-stable`, `staging-stable` | - | `production/*` | `production/app-server`, `production/load-balancer` | - | `*gitlab*` | `gitlab`, `gitlab/staging`, `master/gitlab/production` | - -1. Protected branch settings (like "Developers Can Push") apply to all matching branches. - -1. Two different wildcards can potentially match the same branch. For example, `*-stable` and `production-*` would both match a `production-stable` branch. - >**Note:** - If _any_ of these protected branches have "Developers Can Push" set to true, then `production-stable` has it set to true. - -1. If you click on a protected branch's name, you will be presented with a list of all matching branches: - - ![protected branch matches](protected_branches/protected_branches3.png) - +This document is moved to [user/project/protected_branches.md](../user/project/protected_branches.md) |