Junior — Middle
How is performance and resource metrics collected and tracked in Java?
sobes.tech AI
Answer from AI
In Java, the git cherry-pick command is used to select and apply a specific commit or commits from one branch to another. It allows transferring individual changes without merging the entire branch.
Common scenarios for using cherry-pick:
- When you need to quickly fix a bug in a release branch by taking a fix commit from the main development branch.
- To selectively transfer features or changes between branches.
Example of usage:
git checkout release-branch
git cherry-pick <commit-hash>
This will apply the changes from the specified commit to the current branch.