Git · Branches and merges
git merge --ff-only
Fails unless the merge can be a fast-forward, which keeps history linear.
Syntax
git merge --ff-only <branch>Example
Example
git merge --ff-only origin/main
More in this group
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.