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
ec318ca7
Commit
ec318ca7
authored
May 18, 2021
by
Nourdin el Bacha
Committed by
Amy Qualls
May 18, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add examples for branch regex push rules
parent
a5b0965e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
doc/push_rules/push_rules.md
doc/push_rules/push_rules.md
+7
-0
No files found.
doc/push_rules/push_rules.md
View file @
ec318ca7
...
...
@@ -59,6 +59,13 @@ If you have other target branches, include them in your regex. (See [Enabling pu
The default branch also defaults to being a
[
protected branch
](
../user/project/protected_branches.md
)
,
which already limits users from pushing directly.
Some example regular expressions you can use in push rules:
-
`^JIRA-`
Branches must start with
`JIRA-`
.
-
`-JIRA$`
Branches must end with
`-JIRA`
.
-
`^[a-z0-9\\-]{4,15}$`
Branches must be between
`4`
and
`15`
characters long,
accepting only lowercase letters, numbers and dashes.
#### Default restricted branch names
> Introduced in GitLab 12.10.
...
...
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