Version-control merging

ID: version-control-merging

Version-control merging combines development histories and their changes into a result intended to preserve both lines of work. In Git, a usual three-way merge compares two branch tips with a common base. Independent edits may combine automatically; overlapping or incompatible edits can produce a merge conflict requiring a decision.[ref]
If one tip is already an ancestor of the other, a fast-forward can move the branch reference without creating a separate merge commit. Otherwise a merge commit can record the combined snapshot and both parents. A textually clean merge can still be semantically wrong: one branch can change a function's contract while another adds a caller using the old contract. Testing and review of the combined result remain distinct from resolving text conflicts.

New to topics? Read the docs here!