简体   繁体   中英

What are git's priorities when merging branches?

Suppose that I hav two git branches; branch_one and branch_two . If I merge these branches, will one of the two branches be considered more "up to date" that the other? Is there a difference between git merge branch_one branch_two and git merge branch_two branch_one ?

Thank you in advance.

It's symmetric. Only during conflict it marks code as "their" "mine" differently. The merged branch tip will have changes from both branches, while other branch will be unchanged.

BTW, command git merge b1 b2 does octopus merge of two branches into a current HEAD, so the command merges three branches. But I guess it's not what you meant, but just an illustration.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM