To merge a branch into the current branch is to make contain the commits of . The merge base of two commits is their best common ancestor: a common ancestor of which no other common ancestor is a descendant. If the tip of is itself the merge base, is simply moved to the tip of : a fast-forward merge. Otherwise Git makes a three-way merge: it compares each file in the merge base, in and in , keeps every change made on either side, and records the result in a merge commit with two parents.
main; the three-way merge made commit 58e3, whose two parents are the tips of the two branches, and whose content combines both changes made since the merge base 9fdd.