Bird
0
0

Which of the following is the correct syntax to cherry-pick multiple commits with hashes a1b2c3 and d4e5f6?

easy📝 Syntax Q12 of 15
Git - Cherry-Pick and Advanced Merging
Which of the following is the correct syntax to cherry-pick multiple commits with hashes a1b2c3 and d4e5f6?
Agit cherry-pick --all a1b2c3 d4e5f6
Bgit cherry-pick a1b2c3,d4e5f6
Cgit cherry-pick -m a1b2c3 d4e5f6
Dgit cherry-pick a1b2c3 d4e5f6
Step-by-Step Solution
Solution:
  1. Step 1: Review cherry-pick syntax

    The correct way to cherry-pick multiple commits is to list their hashes separated by spaces, not commas or flags.
  2. Step 2: Analyze options

    git cherry-pick a1b2c3 d4e5f6 uses spaces between commit hashes without extra flags, which is the correct syntax.
  3. Final Answer:

    git cherry-pick a1b2c3 d4e5f6 -> Option D
  4. Quick Check:

    Multiple commits separated by spaces [OK]
Quick Trick: Separate commit hashes by spaces, not commas [OK]
Common Mistakes:
  • Using commas between commit hashes
  • Adding unnecessary flags
  • Using incorrect options like --all

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Git Quizzes