Pankaj Bagwan
Pankaj Bagwan
1 min read



Git is most popular distributed version control system used by developers now a days. And most popular workflow being used is of feature-branch-workflow. In this developer working on feature would shoot off a new branch called feature-branch and give it a meaningful name.

Feature branch having meaningful name is great as developers can have an idea what may be going into that branch and in addition one need not to remember branch name


Note down the Git SHA of commits, one needs to cherry-pick and then

git cherry-pick <GIT-SHA>

keep doing that until one run out of SHA’s to cherry pick

Cherry Pick

Just for the purpose of illustration, let’s assume developer Foo have to work on a feature to build an API endpoint to expose orders. To start working on it developer Foo would create an offshoot branch api_development_order from development branch.

Let’s also assume developer Foo is done implementing API feature with 20 odd commits to api_development_order branch. But assuming that most of them were made for debugging purpose. So are going to cherry pick only few, so let’s cheery-pick those commits

To do this, first one need to checkout to branch we are cherry-picking into

git checkout development

Then cherry-pick those commits in order of older to newer (this is important if you do not want to create merge confict)

git cherry-pick 25f38db58568032041f0591b3f8b446d67af6efc
git cherry-pick c23bf10b2dc578555e4dfe2d96f15b9ab3b46ad0
git cherry-pick 6b31b47826ee747cd250733079b002c6bcffe7c7

About The Author

I am Pankaj Baagwan, a System Design Architect. A Computer Scientist by heart, process enthusiast, and open source author/contributor/writer. Advocates Karma. Love working with cutting edge, fascinating, open source technologies.

  • To consult Pankaj Bagwan on System Design, Cyber Security and Application Development, SEO and SMO, please reach out at me[at]bagwanpankaj[dot]com

  • For promotion/advertisement of your services and products on this blog, please reach out at me[at]bagwanpankaj[dot]com

Stay tuned <3. Signing off for RAAM