Bird
0
0

If you execute git merge branch1 branch2 branch3 from main and branch2 has conflicts, what will Git do?

medium📝 Command Output Q5 of 15
Git - Cherry-Pick and Advanced Merging
If you execute git merge branch1 branch2 branch3 from main and branch2 has conflicts, what will Git do?
AAutomatically skip <code>branch2</code> and merge the others
BAbort the merge and report conflicts, requiring manual resolution
CComplete the merge ignoring conflicts in <code>branch2</code>
DCreate separate merge commits for each branch
Step-by-Step Solution
Solution:
  1. Step 1: Understand conflict handling in octopus merges

    If any branch causes conflicts, Git stops the merge and requires manual conflict resolution.
  2. Step 2: Analyze options

    Abort the merge and report conflicts, requiring manual resolution correctly describes this behavior. Options B and C are incorrect because Git does not skip or ignore conflicts. Create separate merge commits for each branch is unrelated.
  3. Final Answer:

    Abort the merge and report conflicts, requiring manual resolution -> Option B
  4. Quick Check:

    Conflicts halt octopus merge until resolved [OK]
Quick Trick: Conflicts stop octopus merge until fixed [OK]
Common Mistakes:
  • Assuming Git skips conflicting branches
  • Thinking merge completes ignoring conflicts
  • Expecting multiple merge commits

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Git Quizzes