When does Git do a fast-forward merge?

When there is no divergent work, so Git just moves the branch pointer ahead.

Start playing free

  1. When the other branch is far behind
  2. When no work has diverged, so the pointer just moves ✔
  3. 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.

The dad joke
My merge was a fast-forward. I wish my mornings worked that way.
Like this card?
Play the game

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.

  1. 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.

Test yourself in the game