Commit ec318ca7 authored by Nourdin el Bacha's avatar Nourdin el Bacha Committed by Amy Qualls

Add examples for branch regex push rules

parent a5b0965e
...@@ -59,6 +59,13 @@ If you have other target branches, include them in your regex. (See [Enabling pu ...@@ -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), The default branch also defaults to being a [protected branch](../user/project/protected_branches.md),
which already limits users from pushing directly. 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 #### Default restricted branch names
> Introduced in GitLab 12.10. > Introduced in GitLab 12.10.
......
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