merge {target}
incorporates branches by first creating a new commit in the current branch, and then link the target branch’s, or to be merged branch’s, HEAD to the new commit. This results in a web history where the merged branch preserve its origin of divergent and a commit of having two parent commits in the current branch.
Note: When using ^
symbol with commits, be aware whether the commit has multiple parents. See 202205251604#.
It is useful for feature development and bug fixes especially if these are split from a branch. It is similar to 202204261122 but the latter focus on having a linear commit history instead of preserving split and merge points.