Bird
0
0

Which merge strategy creates a new commit even if a fast-forward merge is possible?

easy📝 Conceptual Q2 of 15
Git - Cherry-Pick and Advanced Merging
Which merge strategy creates a new commit even if a fast-forward merge is possible?
AFast-forward merge
BSquash merge
CNo fast-forward merge
DRebase merge
Step-by-Step Solution
Solution:
  1. Step 1: Identify merge strategies

    Fast-forward merges move the branch pointer without creating a new commit if possible. No fast-forward forces a new commit.
  2. Step 2: Understand the difference

    Squash merges combine commits into one but do not preserve history as a merge commit. Rebase rewrites history.
  3. Final Answer:

    No fast-forward merge -> Option C
  4. Quick Check:

    New commit forced = No fast-forward merge [OK]
Quick Trick: Use --no-ff to force a merge commit [OK]
Common Mistakes:
  • Confusing fast-forward with no fast-forward
  • Thinking squash creates merge commits
  • Mixing rebase with merge commits

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Git Quizzes