Bird
0
0

What is the main purpose of using git cherry-pick with multiple commits?

easy📝 Conceptual Q1 of 15
Git - Cherry-Pick and Advanced Merging
What is the main purpose of using git cherry-pick with multiple commits?
ATo delete commits from the history
BTo merge two branches completely
CTo create a new branch from multiple commits
DTo apply specific commits from one branch onto another branch
Step-by-Step Solution
Solution:
  1. Step 1: Understand cherry-pick purpose

    The git cherry-pick command is used to copy specific commits from one branch to another without merging the entire branch.

  2. Step 2: Differentiate from other commands

    Merging combines all changes, deleting commits removes history, and creating branches is unrelated to cherry-picking commits.

  3. Final Answer:

    To apply specific commits from one branch onto another branch -> Option D
  4. Quick Check:

    Cherry-pick purpose = apply specific commits [OK]
Quick Trick: Cherry-pick copies commits, it does not merge branches [OK]
Common Mistakes:
  • Confusing cherry-pick with merge
  • Thinking cherry-pick deletes commits
  • Assuming cherry-pick creates branches

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Git Quizzes