This is a β rebasing β call before merging: you are βupdatingβ (or updating) your local branch with the evolution of the trunk before you merge this local branch back into the trunk.
It allows slow resolution of merging inside your "branch" with possible intermediate commits.
Then, when everything is done, you can do a trivial merge back into the trunk.
Thus, you do not need to postpone commits just because you are merging into a trunk (since only stable commits should be allowed on the trunk).
Don't you consider using the βAβ approach harmful?
Not if the merger is trivial, with a predicted result. In this case, approach B will be a waste of time, an additional merge that is not required (and you should always try to make as few merges as possible: each of these operations may be error prone)
But if the result is not predetermined, then the βBβ approach is finally recommended and allows you to explore the result of the merge in your own branch before acting on the βtrunkβ.
Both approaches are useful; you should not strive to apply only one or only the other, but the most adapted to the situation.
Vonc
source share