Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
8f4d61fb
Commit
8f4d61fb
authored
May 05, 2020
by
Mike Lewis
Committed by
Marcia Ramos
May 05, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Edits to restricted branch names in Push Rules
parent
81465333
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
doc/push_rules/push_rules.md
doc/push_rules/push_rules.md
+12
-5
No files found.
doc/push_rules/push_rules.md
View file @
8f4d61fb
...
@@ -43,11 +43,18 @@ you want the branches to start with a certain name because you have different
...
@@ -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
GitLab CI/CD jobs (
`feature`
,
`hotfix`
,
`docker`
,
`android`
, etc.) that rely on the
branch name.
branch name.
Your developers however, don't always remember that policy, so they push
Your developers, however, don't always remember that policy, so they might push to
various branches and CI pipelines do not work as expected. By restricting the
various branches, and CI pipelines might not work as expected. By restricting the
branch names globally in Push Rules, you can now sleep without the anxiety
branch names globally in Push Rules, such mistakes are prevented.
of your developers' mistakes. Every branch that doesn't match your push rule
Any branch name that doesn't match your push rule will get rejected.
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)**
### Custom Push Rules **(CORE ONLY)**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment