Bird
0
0

Which Git command correctly chooses the 'theirs' version of a conflicted file named app.js?

easy📝 Syntax Q12 of 15
Git - Cherry-Pick and Advanced Merging
Which Git command correctly chooses the 'theirs' version of a conflicted file named app.js?
Agit checkout --ours app.js
Bgit checkout --theirs app.js
Cgit reset --theirs app.js
Dgit merge --theirs app.js
Step-by-Step Solution
Solution:
  1. Step 1: Identify the correct command to pick 'theirs'

    The command to choose the 'theirs' version during conflict is git checkout --theirs <file>.
  2. Step 2: Verify the file name usage

    Using app.js after the command specifies the file to resolve.
  3. Final Answer:

    git checkout --theirs app.js -> Option B
  4. Quick Check:

    Use 'git checkout --theirs' to pick theirs [OK]
Quick Trick: Use 'git checkout --theirs ' to pick theirs version [OK]
Common Mistakes:
  • Using 'git reset' instead of 'git checkout'
  • Confusing '--ours' with '--theirs'
  • Trying 'git merge --theirs' which is invalid

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Git Quizzes