GitBranching

git merge

Combines another branch's history into the current branch, creating a merge commit if the histories have diverged.

Syntax

git merge <branch>

Examples

Merge main into the current feature branch

git merge main

Related commands