CS FundamentalsHardProduct-company placement · Git interview

feature has commits X, then Y, then Z (oldest to newest). On main you run git cherry-pick X..Z. Which commits are applied?

  1. A. X, Y and Z
  2. B. Only X and Z
  3. C. Only Z
  4. D. Only Y and Z

Correct answer: D. Only Y and Z

A..B ranges exclude the starting commit, so X..Z means Y and Z. To include X you would write X^..Z.

More Software Engineering, Git and Cloud Basics questions

Exams that ask this topic