Bird
0
0

After running these commands:

medium📝 Command Output Q4 of 15
Git - Cherry-Pick and Advanced Merging
After running these commands:
git checkout master
git merge featureX featureY featureZ

What is the expected outcome if no conflicts exist?
AA single merge commit combining all three branches into master
BThree separate merge commits, one per branch
CA rebase of featureX, featureY, and featureZ onto master
DAn error indicating multiple branches cannot be merged
Step-by-Step Solution
Solution:
  1. Step 1: Understand octopus merge behavior

    When merging multiple branches without conflicts, Git creates one merge commit with multiple parents.
  2. Step 2: Evaluate options

    A single merge commit combining all three branches into master correctly describes this. Three separate merge commits, one per branch is incorrect because Git does not create separate commits per branch in an octopus merge.
  3. Final Answer:

    A single merge commit combining all three branches into master -> Option A
  4. Quick Check:

    Octopus merge creates one multi-parent commit [OK]
Quick Trick: Octopus merge = one commit with multiple parents [OK]
Common Mistakes:
  • Expecting multiple merge commits
  • Confusing merge with rebase
  • Assuming Git errors on multiple branches

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Git Quizzes