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

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

Avatar

1 badge earned

Collect

Participate in fun challenges

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

Challenges
Coins

Gift kudos to your peers

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

Recognition
Ribbon

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!

Leaderboard

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
4,456,969
Community Members
 
Community Events
176
Community Groups

How do you make branches read-only and also allow creation of new read-only branches?

This documentation contradicts itself. On the one hard, it says this:

They do not prevent branch creation. Branch permissions will only be enforced on updates to existing branches and tags.

On the other hand, it says this:

Prevent all changes
Prevents pushes to the specified branch(es) and restricts creating new branches that match the branch(es) or pattern.

These statements cannot both be true. Furthermore, the second statement appears to be correct, and unfortunately, it sure seams like this means it is impossible to make branches read-only while also allowing the creation of new read-only branches. But I could be missing something, so maybe somebody can help.

We have a branch permission configured with a pattern so that those branches we considered "released" (match the pattern) are read-only (all changes and deletions are prevented). Normally, we would release a branch by "renaming" it from e.g. main-2.0.1 (a development branch name) to 2.0.1 (a release branch name). But Bitbucket does not have a mechanism for renaming branches, so we release by creating a new branch 2.0.1 from main-2.0.1 and then deleting main-2.0.1. However, we can't do that anymore, because our new branch permissions that makes release branches read-only also prevents us from creating release branches. (And, more accurately, we've had to disable our release branch permission so that we can create release branches again.)

So ... how can we make release branches read-only while also allowing the creation of new release branches?

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events