git - Is merging branch A into B same as merging B into A? -


in git repository, merging branch a b same merging b a?

no, if merge b, in end branch have a's changes, , b have both a+b changes.

if merge b a, have both a+b changes, , b have b's changes.

start:

 /a1-a2-a3 x   \b1-b2-b3 

a b merge commit:

 /a1-a2-a3 x   \b1-b2-b3-a*(1,2,3) 

a b fast forward:

 /a1-a2-a3 x   \a1-a2-a3-b1'-b2'-b3' 

b merge commit:

 /a1-a2-a3-b*(b1,b2,b3) x   \b1-b2-b3 

b fast forward:

 /b1-b2-b3-a1'-a2'-a3' x   \b1-b2-b3 

Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -