Copying commits using Cherry-Pick

Cherry-Pick is a process to copy commits from one branch to another. It only copies the changes from the commits instead of copying all the changes available in a branch. Thus, it is completely different from what a merge or rebase performs.

You will need to perform Cherry-Pick on commits when you accidentally committed to a wrong branch and/or want to pull out a set of commits from your Bug-Fix branch to the master/feature branch as soon as those are available:

To Cherry-Pick, first checkout the branch where you want to copy a set of commits from a different branch. Then open the history of the other branch, ...

Get Mastering Visual Studio 2017 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.