I am using Atlassian Bitbucket server v4.8.6.
How do I restrict restrict branch creation based on pattern.
Rules explained below -
- Only ABC team should be able to create release/ABC-*
- Only XYZ team should be able to create personal/XYZ-*
I am using Atlassian Bitbucket server v4.8.6.
How do I restrict restrict branch creation based on pattern.
Rules explained below -
You can't create rules to prevent only the "creation" of branches. These are the avaliable restrictions:
Prevent all changes
Prevent deletion
Prevent rewriting history
Prevent changes without a pull request
To create branch permissions do the following:
This can be done by adding "*" on Select branch text field. See the screenshot below.
Go to your repository > Settings > Branch permissions > Add permission
Under "Select branch - By name or pattern", put an asterisk (*)
Save
After that, you can restrict each branch patterns you want for different teams or people.
ABC group
Select branch = release/ABC-*
Write access = ABC group or ABC members
Personal branch
Select branch = personal/XYZ-*
Write Access = Your account