Interview Questions/Phone Screen/Git Fast-Forward vs --no-ff
BeginnerPhone
2 min

Git Fast-Forward vs --no-ff

GitVersion Control
Advertisement
Interview Question

What is a fast-forward merge in Git, and when would you use --no-ff?

Key Points to Cover
  • Fast-forward: branch pointer moves without a merge commit
  • `--no-ff` forces a merge commit to preserve branch history
  • Use `--no-ff` to keep feature history for audits/reverts
Evaluation Rubric
Correctly defines fast-forward34% weight
Explains --no-ff behavior33% weight
Gives valid usage scenarios33% weight
Hints
  • 💡Think: linear history vs preserving branch context.
Potential Follow-up Questions
  • How does squash merge differ?
  • When would you prefer rebase instead?
Advertisement