分支代码合并到主干等待预发了,发现分支代码在合并代码之后仍然有代码提交,此时需要将分支后续提交的代码再次合并到主干。此时用cherry-pick
1)查看当前分支git branch
ANTM0540804_20190531_XXX
2)查看分支上要再次合并到master的commitId,例如我分支上最近3次的要合并到主干
git log --oneline -3(注意是oneline,我首次输入的是online,看着报错一脸懵逼)
d21c480 test3更改
822009b test2更改
3984686 test1更改
3)本地checkout master的代码
git checkout master
4)保证当前master上,按照时间顺序(距离当前时间由远--近)开始操作
git cherry-pick 3984686
----我首次运行命令报错信息如下----
error: could not apply 3984686... test1更改
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
Warning: Your console font probably doesn't support Unicode. If you experience s
trange characters in the output, consider switching