What is a fast-forward merge in Git, and when would you use --no-ff?
- 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
- 💡Think: linear history vs preserving branch context.
- ⚠️Not clearly distinguishing between a fast-forward merge (pointer move, no new commit) and a non-fast-forward merge (new commit, two parents).
- ⚠️Failing to articulate the specific benefits of preserving merge history, such as for auditing, simplified reverts, or clearer workflow visibility.
- ⚠️Confusing the `--no-ff` strategy with `git rebase` and not explaining their distinct impacts on history.
- ⚠️Not mentioning that fast-forward merges are the default behavior when possible, making `--no-ff` an explicit override.
- ⚠️Providing a generic explanation without detailing the specific conditions that allow or prevent a fast-forward merge.
- ❓How does squash merge differ?
- ❓When would you prefer rebase instead?
Ready to prove your AWS DevOps knowledge?
Practice with free DevOps Engineer Professional (DOP-C02) exam questions. Instant answers and detailed explanations — no account required.
Start free practice quizQuestions that share similar topics with this one
Deepen your knowledge with these related blog posts
Monorepo vs Polyrepo: Choosing the Right Repository Strategy for Your Microservices
A comprehensive guide to choosing between monorepo and polyrepo strategies when decomposing monoliths into microservices. Learn the trade-offs, implementation patterns, and real-world considerations that matter in production.
GitHub Self-Hosted Runners on AWS: Pull vs Push for On-Demand Scaling
Cut your CI costs by running GitHub Actions on AWS only when you need them. Compare pull-based (polling) and push-based (event-driven) architectures for spinning up on-demand self-hosted runners.
From Terraform to GitOps: A Practical Migration Roadmap
A step-by-step guide to migrating from traditional Terraform workflows to GitOps, including migration patterns, common pitfalls, and practical diagrams to guide your journey.