Git · Middle · Question 7 of 75
What does git cherry-pick <hash> do?
- 1Moves the commit from its branch to the current one
- ✓Correct answer: Applies that commit's changes as a new commit here
- 3Marks the commit so it's included in the next release
Explanation
The original commit stays where it was; you get a copy with a new hash. A typical use is backporting a fix from main to a release branch.