Combine from PROD to HEAD or HEAD to PROD?

We have two branches: 1. HEAD - latest version (AKA Trunc) 2. PROD - released version

When you fix bugs in the released version, which one do you make:

  • Correct it in PROD, then merge in HEAD
  • Correct it in HEAD, then merge in PROD

The advantage (1) is that in this way you absolutely cannot harm the released version by accidentally delivering unverified code from HEAD (it is assumed that PROD is always more stable / verified than HEAD).

The advantage of (2) is that for a part of the code in HEAD there may be more usages than in PROD, therefore, if you correct only in PROD, you may not find all such usages and thus copy errors in HEAD.

I personally for (1). What do you think?

+3
source share
2 answers

Bug fixes should be applied to the branch and combined with the main development line. You need to do this to prevent new features from appearing in a product release that is not intended for this. Note that the easiest way to do this, if you need to change the HEAD, may be to apply the same changes in both branches.

+4
source

(1).

Remember that not all errors corrected in PROD must be merged back into HEAD .

Sometimes your current code is already developing in such a way that the bugs fixed in PROD are no longer relevant.

0
source

All Articles