Bird
0
0

Which scenario best shows when git cherry-pick is useful?

easy📝 Conceptual Q2 of 15
Git - Cherry-Pick and Advanced Merging
Which scenario best shows when git cherry-pick is useful?
AYou want to create a new branch from the latest commit
BYou want to merge all features from the development branch into the stable branch
CYou want to apply a bug fix commit from the development branch to the stable branch
DYou want to delete a branch after merging
Step-by-Step Solution
Solution:
  1. Step 1: Identify the use case for cherry-pick

    Cherry-pick is ideal for applying specific commits like bug fixes across branches without merging all changes.
  2. Step 2: Eliminate unrelated options

    Merging all features, deleting branches, or creating branches are not related to cherry-pick usage.
  3. Final Answer:

    You want to apply a bug fix commit from the development branch to the stable branch -> Option C
  4. Quick Check:

    Cherry-pick use case = selective commit transfer [OK]
Quick Trick: Use cherry-pick for single commit fixes across branches [OK]
Common Mistakes:
  • Mixing cherry-pick with full merges
  • Using cherry-pick to delete branches
  • Confusing branch creation with cherry-pick

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Git Quizzes