When does Git do a fast-forward merge?
When there is no divergent work, so Git just moves the branch pointer ahead.
- When the other branch is far behind
- When no work has diverged, so the pointer just moves ✔
- When the merge has conflicts
Why: If the branch you merge in simply continues from where your branch is, nothing needs combining. Git slides your branch pointer forward to the newer commit, with no new merge commit.
Huh, didn't know that: If both branches have new commits, Git does a three-way merge using the two branch tips and their common ancestor.
My merge was a fast-forward. I wish my mornings worked that way.
References
Answer: When no work has diverged, so the pointer just moves. If the branch you merge in simply continues from where your branch is, nothing needs combining. Git slides your branch pointer forward to the newer commit, with no new merge commit.
- Pro Git book: Basic Branching and Merging git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging
Git simplifies things by moving the pointer forward because there is no divergent work to merge together
Checked 2026-10-10.
Think this answer is wrong? Tap "Challenge this answer" on the card in the game and tell us why.
More stuff everyone should know
That's stuff everyone should know.