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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Push one or multiple commits to multiple branches Edited

Let's say I have a main develop and develop_10, develop_11, develop_12, develop_13 and etc branches

  • While I was working on develop_12 I realized and solved a bug which is relevant to all branches and want to push it to develop, develop_10, develop_11 and develop_13
  • Also if I solve a bug on develop and I want to push that to all develop_10, 11, 12... etc branches

Any solution other that cherry-pick?

1 answer

1 accepted

0 votes
Answer accepted

Hello @Ilgar Ilyasov,

The answer depends on your branches structure.

If all these branches are completely independent and can't be merged one into another, the only way to avoid cherry-picking is to find a commit in the history that belongs to all branches in question (i.e. reachable from all these refs), create a branch off that commit, make a commit with a fix on that new branch and then merge it in every branch in question.

If you can make one-way merges (for instance, the branches denote your product releases, and version 11 should fully contain version 10, so develop_10 can be merged into develop_11), then you can fix the issue on the "oldest" branch, and then make a so called cascade merge of an older branch into the newer branch until you reach main develop branch. However, this might not always be trivial because of on your release mechanism.

Does this make sense? Let me know if you have any questions.

Hope this helps.

Cheers,
Daniil

Thanks for the quick response @Daniil Penkin cascade merge makes sense

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

Powering DevOps with Bitbucket Server & Data Center

Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster   ! While we’re all excited about the new improvements to Bitbucket ...

1,849 views 0 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you