Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

How to enforce branch naming policy ?

Hello Community, 


I am a Panagiotis, and software engineer who likes to improve his skill and try new things. 


I am a newbie at bitbucket and I would like some guides and support from the community.


My case is simple I would like to enforce a branch naming policy for my Repository. In more detail, my goal is to have only the branch following names and avoid (reject) all other branches which not follow my convention. The branches should follow the convention:  

  • feature-xxxx
  • bug-xxxx-xxxx
  • legacy-fix-xxxx
  • performance-fix-xxxx
  • technical-depth-fix-xxx


So If an unexpired use tries to push the branch without the previous pattern matching the push branch should be rejected


For simplicity let's assume we should follow only the convention  `feature-xxxx`. My first thought was to set a pattern for the branch permission session, so I try to set the following patter 

* | !(feature-*)  


With Write access NONE and Merge via pull request NONE too. But it didn't work. :|


Then I try to have separate the rules 


pattern  *

Write access none

Merge via pull request none



pattern  ^feature-*

Write access anybody

Merge via pull request anybody


But it didn't work that too :(


I really appreciate some advice. Thank you all for your time and Collaboration !!


Best Regards, 

Panagiotis Parthenis

1 answer

0 votes
Ben Atlassian Team Jun 07, 2022

Hey Panagiotis,

Welcome to the Bitbucket Cloud community!

I am reaching out as I have noticed that you have not yet received a reply from our community. The branch permissions feature is only used to determine READ/WRITE privileges for certain branches and does not restrict users from being able to push new branches that do not match naming conventions.

I have reached out to our development team to create a feature request on your behalf however to potentially include this functionality in Bitbucket Cloud:

Feel free to "Watch" this feature request for further updates.


- Ben (Bitbucket Cloud Support)

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events