Automatic Merge - Always merges into a development branch?

Hi,

We are migrating to Stash (renamed to Bitbucket Server) and new to Git.

For a repository, I had set up the following branching model:

  • Development Branch: Use default branch
  • Production Branch: <none currently selected>
  • Feature prefix is issue/
  • Release prefix is release/

My intent was that master contains only the code that has been released to production. For example, if we last deployed release 3.3 to production then head of master contains only release 3.3 code.

We work on two releases at the same time (e.g., 3.4 and 3.5) so we have long-lived release branches that really never go away.

When working on a feature, we branch from a release branch. In this example, if we finish a feature in 3.4 then we could use automatic merge to get the change into 3.5.

It appears that automatic merge also wants to merge changes into the Development branch. As configured in our repository, that would be master.

Is that correct?

To make this work out as intended, do I need to let master become a development branch and let automatic merge update it? Then make a separate production branch that we manually merge a release into once the release goes into production?

1 answer

This widget could not be displayed.

Sean

We can deal branching in a few different ways. We can keep master as the latest production release. And  you can have a branch called "Staging" or "develop" whichever way you want to call it. In a simple scenario, a normal build can happen from staging branch and when you are ready to release the code the production, you can do an auto merge to master branch as soon as the production build is released. You can acheive this in diferent way (making a manual trigger in bamboo to  run once you are sure that a particular code is a prod code). If you use bamboo with stash, then this is a good read https://confluence.atlassian.com/bamboo/using-plan-branches-289276872.html

 

If you have multiple levels of branching, then you can also design branching in such a way that after every release of that branch, you automerge that code to the branch level above that.

 

Some good reads for branching workflows

https://confluence.atlassian.com/stash/workflow-strategies-in-stash-337772794.html#notfound

 

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Aug 21, 2018 in Bitbucket

Branch Management with Bitbucket

As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...

1,337 views 8 11
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you