Semua buku

Profesional

Aplikasi Tentang Pelatih Masuk Mulai membaca

Computer Science · Glosarium

Apa itu Merge, merge base?

Dikenal juga sebagai: merge base · fast-forward merge · three-way merge

Definition 9.7 University Computer Science — Year 1 · Bab 9 — Version Control with Git

To merge a branch bb into the current branch aa is to make aa contain the commits of bb. 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 aa is itself the merge base, aa is simply moved to the tip of bb: a fast-forward merge. Otherwise Git makes a three-way merge: it compares each file in the merge base, in aa and in bb, keeps every change made on either side, and records the result in a merge commit with two parents.

The commit graph of , each arrow going from a commit to its parent. The fast-forward only moved the name 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.
The commit graph of Output 9.4, each arrow going from a commit to its parent. The fast-forward only moved the name 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.
Baca dalam konteks →