Category: GIT

Tips and Tricks : GIT Cherry Pick

I came across a situation where I need to merge only couple of commits from branch(not the entire branch) and Git cherry pick does the job pretty clean. I use Git extensions IDE and context menu makes it easier.

Here are the steps:

  • Make sure you checkout the branch you want to merge the commits
  • Navigate to the commit you want to cherry pick
  • Right click and select cherry pick commit option

  • It opens a dialog with the option to choose auto commit and add commit reference. I recommend checking both of them. By default, they are not checked. Hit Cherry pick button.
  • Now the commit is auto committed and ready to be pushed into current branch.

Happy cherry picking!

2