Git · Branches and integration

git merge

Integrates another branch. A no-fast-forward merge keeps a visible merge commit.

Syntax
git merge --no-ff <branch>

Example

Example
git switch main
git merge --no-ff feature/auth

More in this group

git branch git checkout git cherry-pick git merge --abort git switch git worktree Merge conflict markers

Learn this in the course

Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.

Open the course