O'Reilly logo

Continuous Integration, Delivery, and Deployment by Sander Rossel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Cherry picking

Another form of merging is cherry picking. With a cherry pick, you target a specific commit on one branch and merge just that one commit, as a new separate commit, to another branch. That means you do not have to merge an entire branch all at once.

It also means that when you do cherry pick all the commits on a branch, the branch still will not be marked as merged and so deleting it is only possible by forcing it:

git cherry-pick [commit id]

You can get the commit ID using git log and preferably git log --oneline. For example, I have added a reactor branch and created two commits. In the first commit, I added a reactor.txt file and in the second commit, I changed some text in that file. Now, on my master branch, I only want ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required