|
|
|
|
|
by kazinator
610 days ago
|
|
This branch discussion doesn't speak to the present topic (much). Merging involves rebasing, possibly requiring conflict resolution. Merge versus rebase is just git speak for two different ways of tracking things when diverging streams recombine. In a nutshell, merge creates a single new commit which brings all the cumulative changes from a source branch onto the target. The commit has two parents: the prior commit on the destination branch and the commits on the source branch. Rebase creates a new commit out of every individual commit on the branch, bringing them individually into the target branch, much as if they were being merged. However, they have only one parent: their target branch lineage. (Rebasing is way better from a conflict point of view because the changes are individually brought in. A merge creates a "patch bomb" on the destination branch in which serveral totally unrelated conflicts might have been resolved, pertaining to different commits in the original.) |
|