git cherry-pick resolve merge conflicts

Suppose there is a branch branchA, it creates from dev branch to the command is git checkout -b origin / develop

In this branch I have a commit, is assumed to be commit1.

 

I had just to give dev mention merge. But executives might say, not to mention the dev mentioned release1 it. This time directly to release1 mention merge, may contain a lot of unnecessary conflict and commit. This time it can command git cherry-pick.

step:

1, from a branch of a new release branchB:

git checkout -b branchB origin/release1

2, find commitid submitted on branchA, as commit1, use git cherry-pick command :( Note: This has been switched to the new branch branchB)

git cherry-pick commit1

3, push the remote branch.

git push origin branchB

 

This time again release1 mention merge, it will only contain a commit, and may contain the conflict, and then to resolve the conflict.

Guess you like

Origin blog.csdn.net/qq_35462323/article/details/94634037