Why is merging function branches in release branches bad?

We have adopted the branching model proposed by Vincent Driessen , and we do almost everything as he described in his article .

Only when it comes to handling release branches does we deviate a little.

Vincent proposes to develop functions in branches that are branched from the developer. When it is decided which functions are included in the next release, they are combined back into the developer, and the release branch is created from it.

After this, the feature branch should be used only for testing and error correction. When a release is deployed for life, the release branch merges back into the developer and wizard.

Instead, we should merge the functions directly into the release branch: realease branch modelling

I feel that this is not how it should be done, and I am trying to come up with cases where it can actually complicate the situation.

I can think of the following:

Suppose the new Feature c feature builds on Feature a , which is already merged with the release branch. I must first merge the release branch back into the developer in order to be able to create a new Feature c branch from the developer.

Are there other cases where this branching model can complicate the situation?

+7
git branching-and-merging
source share
1 answer

In one case, which I could think of, this can complicate the situation, as it will begin to block further development.

Note that you are developing function A, which will immediately appear in the next version. Now there is another development team that will work on function B, which is highly dependent on function A, but it should only be released after a few sprints. So, obviously, we will separate function B from function A.

Now you find an error in function A, your release for function A is approaching quickly, you have two options: fix / hack or correct code coefficient and fix.

Over time, as a limitation, it is reasonable to have a hot-fix, but, given the future, we need the right re-factor and correction.

The good news is that we can go for both.

With your strategy (as I understand it), your release branch will receive all the corrections and corrections (contains 5+ commits), since you cannot do anything like that for function A (if you strictly adhere to the rules). Consider the number of releases of these fixes if you have 10 more features.

But with the Vincent Driessen strategy, there is always a development branch, like a prefix between your function and release, so for such hot fixes you can merge back into the development branch, and then from there for hot fixes, and then merge back into development and then release it. And you have the advantage of no hacks / fixes anywhere on your branch. Further functions based on this function may continue in parallel. And you can refuse branches of corrections or delete from history. This is just one point of view, and you can probably defend your strategy in this case. I am open to further discussions and corrections in my answer :)

And here is a rather unpleasant image depicting what I am transmitting. Git branching diagram

+7
source share

All Articles