How to set multiple production and development branch in single repository bitbucket?

karan_shukla
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 28, 2022

Currently by default Master branch is set and you can select any 1 branch as Production branch and 1 branch as development branch.

but what if we have multiple Production and Development branch

Ex:
Master branch (Production branch for main site)
Development (Development branch for main site)

subDomainMaster (2nd Production branch for subdomain)
subDomainDevelopment (2nd Development branch for subdomain)

subDomainTwoMaster (3rd Production branch for subdomain 2)
subDomainTwoDevelopment (3rd Development branch for subdomain 2)

for this type of scenario how we can set it and commit flow also work independently.

1 answer

0 votes
dlaser
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 29, 2022

This is a git feature. I think your requirement is to have each subDomain have it's own branch. This way you can push the features into each branch. Since git lets you have branches You should try a Branching Model like this:
Main:
Production
release/SubDomian1
release/SubDomain2
Development/SubDomian2Dev
Development/SubDomian2Dev

This way you organize your branches where Development branches feed into Production or Release. The branches under Release are treated like Mains. Everything then feeds back into the default branch eventually. Production acts like the main branch for all of the subdomains, while each subdomain gets it's own default branch. But you could also have something as complicated as this is you need it:

Main:
Production:
Release/MainSub1/Domian1
Release/MainSub2/Domain2
Development/Sub1/Domian1Dev
Development/Sub1/Domian2Dev
Development/Sub2/Domian1Dev
Development/Sub2/Domian2Dev

The added branch directores can describe the intended purposes of each branch to help you keep track of the branches and avoid human error. This will assist in searches. But you should also vote for BCLOUD-9368 and BCLOUD-14286.  BCLOUD-9368 would allow you to set the default merge branch. BCLOUD-14286 would do some of the merging for you.

But really git allows you to create any arbitrary branch name in folders.  You can use the branches in any way you would like.  The Feature Requests listed will only help keep out human error.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events