Question

I'm asking myself how manage branching by release and hotfixes.

For example, if we have a main branch, a release branch V1, and a release branch V2 and development branch for each release branch(developmet V1 and V2) and we find a bug in the release branch V1. We have to develop a hotfix, but how merge this hotfix in the release branch V2 and the development branch. Like that : release V1 to Main to release V2 and main to development V1 and V2 ?

If I merge like that, release to release V2 is out of date ?

But how manage the main branch ? Should it not be as stable as possible ? And how this main branch is manage because there is a lot of merge so which version of developpement is in main ?

With this pattern I will cover cases where customers can have differents versions of a product.

Thanks.

enter image description here

Was it helpful?

Solution

You do that in following order:

  1. Create hotfix in Release 1 branch
  2. Merge it to Main
  3. Merge it to Release 2
  4. Merge it to whatever Development branches you have

(of course, there is a stabilization after each merge)

But how manage the main branch ? Should it not be as stable as possible ?

Yes, it should. That's why it must be covered with tests.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top