CS FundamentalsHardWipro · Accenture pattern
You cherry-pick commit X from branch feature onto main. Which statement is correct?
- A. main gets a new commit with the same changes as X but a different hash, and X itself stays only on feature
- B. X is moved from feature to main and removed from feature
- C. main gets a merge commit whose second parent is X
- D. main now contains commit X with the same hash, so feature counts as merged
Correct answer: A. main gets a new commit with the same changes as X but a different hash, and X itself stays only on feature
cherry-pick re-applies X's diff on a new parent, creating a new commit object (new hash). X is not an ancestor of main, so feature is not 'merged'; a later merge of feature usually applies the same change cleanly but the history shows it twice.
Practise more Software Engineering, Git and Cloud Basics questionsSoftware Engineering, Git and Cloud Basics: notes and key points
More Software Engineering, Git and Cloud Basics questions
- git push origin main is rejected with a 'non-fast-forward' error. What does it mean, and what is the correct fix on a shared branch?
- Which document records what a system must do — its functional and non-functional requirements — as agreed with the client before design…
- Before a sale, a team checks that its shopping site still responds well with 10,000 concurrent users, the expected peak. Which type of…
- Which of the following is a NON-functional requirement for an online banking app?
- An age field accepts integers from 18 to 60 inclusive. Which set of test values corresponds to ROBUST boundary value analysis for this…
- “Are we building the product right?” — checking that each phase’s output conforms to its specification, for example through reviews and…