Is the union of a branch of A in B the same as the union of B in A?

The git repository merges branch A into B, similar to merging B into A

+4
source share
1 answer

No, if you combine A into B, then at the end, branch A will only have changes A, and B will have changes A + B.

If you combine B into A, then A with have both A + B changes, and B will only have changes B.

Start:

/A1-A2-A3 X \B1-B2-B3 

From A to B with Merge Lock:

  /A1-A2-A3 X \B1-B2-B3-A*(1,2,3) 

A to B fast forward:

  /A1-A2-A3 X \A1-A2-A3-B1'-B2'-B3' 

B in with merger fixation:

  /A1-A2-A3-B*(B1,B2,B3) X \B1-B2-B3 

B in fast forward:

  /B1-B2-B3-A1'-A2'-A3' X \B1-B2-B3 
+4
source

Source: https://habr.com/ru/post/1499346/


All Articles