Bird
0
0

After a merge conflict on config.yaml, you run:

medium📝 Command Output Q4 of 15
Git - Cherry-Pick and Advanced Merging
After a merge conflict on config.yaml, you run:
git checkout --theirs config.yaml
What will be the content of config.yaml?
AThe version from your current branch
BThe version from the branch you are merging from
CAn empty file
DThe common ancestor version
Step-by-Step Solution
Solution:
  1. Step 1: Understand the command effect

    'git checkout --theirs ' replaces the conflicted file with the incoming branch's version.
  2. Step 2: Identify which version is 'theirs'

    'Theirs' means the branch you are merging from, so the file content will be from that branch.
  3. Final Answer:

    The version from the branch you are merging from -> Option B
  4. Quick Check:

    Checkout --theirs = incoming branch content [OK]
Quick Trick: Checkout --theirs picks incoming branch file content [OK]
Common Mistakes:
  • Thinking it keeps current branch content
  • Expecting the file to be empty
  • Assuming it resets to common ancestor

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Git Quizzes