Git - git cherry-pick


What is the purpose of the 'git cherry-pick' command?

Aside from merging, sometimes you want to just pick one commit from a different branch. To apply the changes in revision rev and commit them to the current branch use:

git cherry-pick rev

How can we cherry pick patches?

git cherry-pick other-branch~3     # apply 4th last patch of other-branch to current branch
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License