Skip to content

[Step 7] Merge the part you need with Cherry pick

Sam Lin edited this page Jan 17, 2018 · 1 revision

Case: When there is a change in other branch needs to apply to your branch and you don't want to merge these 2 branches.

You can copy paste the code or you can use Cherry-pick.

  1. From step 6, we have 2 branches so far. Add some changes to Readme.md and commit it as fix: patch in the message.

  2. In Branches tab, right-click on these 2 branches and click View History

  3. Switch to the other branch, by double click on the branch name in Branches tab.

  4. In history tab of the previous branch, right-click on fix: patch commit and click Cherry-Pick

5a. If there is nothing conflict, it will just commit the change after clicking continue.

5b. If there are conflicts, it will switch to Resolve Conflicts tab to begin the merge process

  1. You should see a new commit called fix: patch in your checkout branch. You can go to Solution Explorer and check the file change by right-click on file and click View History' > right click on the latest commit > compare with the previous...`.

The whole process

Clone this wiki locally