CS FundamentalsVery hardGATE CS · TCS NQT Prime · Product Company SDE
What does `git cherry-pick <commit>` do?
- A. Merges two entire branches together
- B. Reverts that commit's changes
- C. Applies the changes introduced by that single specific commit onto the current branch, creating a new commit here, without pulling in any other commits from its original branch
- D. Deletes that commit from history everywhere
Correct answer: C. Applies the changes introduced by that single specific commit onto the current branch, creating a new commit here, without pulling in any other commits from its original branch
Cherry-pick takes just one commit's diff and replays it as a new commit on the current branch, which is useful for pulling a single fix across branches without merging everything else.
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
- A PERT activity has optimistic time 5 days and pessimistic time 15 days. What is its standard deviation, SD = (P − O) / 6?
- Two components with availability 99.5% and 90.0% are connected in series (the system works only if both are up). What is the system's…
- For a semidetached mode project with Basic COCOMO effort E = 166.0 person-months, the development time formula is D = 2.5 × E^0.35 months…
- A Scrum team completed 17, 18, 40, 40, 17 story points in its last 5 sprints. The remaining backlog is 211 points. Using average velocity…
- A regression test suite is re-run after a bug fix primarily to:
- A control-flow graph has 8 edges, 7 nodes and 1 connected component. Using V(G) = E − N + 2P, what is its cyclomatic complexity?