We are migrating to Stash (renamed to Bitbucket Server) and new to Git.
For a repository, I had set up the following branching model:
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?
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
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...
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!
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