how to merge a specific commit in Git

In this article am going to explain how to merge(cherry pick) specific commit in Git

When you are working on two different branches you often merge code from one branch to another. But if you want to merge specific changes to another branch you can do it by cherry picking specific commit.

Using Git Extensions you can easily merge a specific commit. (Download Git Extensions from link1 or from here link2)

In Git Extensions open your repository. It will show you all the commits. Select any specific commit and right click on it. Then select cherry pick commit. Check the below screenshot for reference

Once you select Cherry pick commit it opens another small popup as shown below

Check "Automatically create a commit" if you want to automatically commit this changes into current branch or if you want to manually commit, keep the box unchecked and click on "Cherry pick".

In this way you can merge a specific commit in Git

No comments:

Post a Comment