Does it merge without conflicts, equivalent to a rebase without conflicts?
No, and there is actually a trivial case where the merge works fine but rebase does not:
...--o--A <-- mainline
\
B--C--!C <-- branch
where C
is the commit that conflicts with A
, and !C
is its reversion. Merge branch
back to is mainline
equivalent in source tree effect to merge commit B
back to mainline, on reload copies as C
(which conflicts with A
) and then !C
(which, when resolved, also conflicts with A
).
Of course, you can recompose interactively and easily dismissed as C
, and !C
in this case, but in a more complex chain, you can see how the commit may conflict with A
, but subsequent fixation can effectively resolve the conflict "in advance" so that merging tip branches back to the trunk have no conflicts.
source to share