Skip to content
Back to library
beginnerMerging & Rebasing

Fast-forward Merge

The Definition

A fast-forward merge occurs when the target branch is directly ahead of the source branch.

Mental Model

"In a fast-forward, Git simply moves the branch pointer forward to point at the source commit. It's like fast-forwarding a tape to catch up."

Visual Simulation

Live Engine
featuremain
No new commit created. main just "catches up".

Watch Out (Common Pitfalls)

!

Thinking all merges create merge commits

!

Not understanding when fast-forward happens

!

Disabling fast-forward when you don't need to

Hands-on Command

shell
~ $git checkout main git merge feature-branch (if feature is ahead of main)