Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-05-05 21:09:43 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-05-05 21:09:43 +0300
commit38ceebb9b3a541f8530b379d5b5ab5e13ffc58ed (patch)
tree7a0494f677459f96e6deda30da4069b7c038eca4 /doc/push_rules/push_rules.md
parent0d09054d162458364ce3fc431506c182e2a5fa4f (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/push_rules/push_rules.md')
-rw-r--r--doc/push_rules/push_rules.md17
1 files changed, 12 insertions, 5 deletions
diff --git a/doc/push_rules/push_rules.md b/doc/push_rules/push_rules.md
index f0d45efb1b0..15d09b31726 100644
--- a/doc/push_rules/push_rules.md
+++ b/doc/push_rules/push_rules.md
@@ -43,11 +43,18 @@ you want the branches to start with a certain name because you have different
GitLab CI/CD jobs (`feature`, `hotfix`, `docker`, `android`, etc.) that rely on the
branch name.
-Your developers however, don't always remember that policy, so they push
-various branches and CI pipelines do not work as expected. By restricting the
-branch names globally in Push Rules, you can now sleep without the anxiety
-of your developers' mistakes. Every branch that doesn't match your push rule
-will get rejected.
+Your developers, however, don't always remember that policy, so they might push to
+various branches, and CI pipelines might not work as expected. By restricting the
+branch names globally in Push Rules, such mistakes are prevented.
+Any branch name that doesn't match your push rule will get rejected.
+
+Note that the name of your default branch is always allowed, regardless of the branch naming
+regular expression (regex) specified. GitLab is configured this way
+because merges typically have the default branch as their target.
+If you have other target branches, include them in your regex. (See [Enabling push rules](#enabling-push-rules)).
+
+The default branch also defaults to being a [protected branch](../user/project/protected_branches.md),
+which already limits users from pushing directly.
### Custom Push Rules **(CORE ONLY)**