merge base

The newest commit that two branches both contain, the point where their histories split.

In more detail

Git merges by comparing each branch against this base: a change made on only one side is taken automatically, and a conflict happens only when both sides changed the same lines differently. If the base is your own branch tip, the merge can fast-forward. git merge-base main feature prints it.

Example

git merge-base main feature

Related terms

Taught in

References