merge

Combining the work of two branches into one, either by moving a branch forward (a fast-forward) or by recording a merge commit.

In more detail

git merge feature brings feature's commits into the current branch. If the current branch has no commits the other lacks, Git just moves the label forward; if both moved, Git combines the changes since their merge base and records a commit with two parents. Merging never rewrites existing commits, which is why it is safe on shared branches.

Examples

git merge feature
In this course: A quality gate decides whether a change is safe to merge. Mark review comments that must be fixed before merge separately from preferences.

Related terms

Taught in

References

Certification courses