背景:
开发中有master、develop再加自己的分支,一般情况是在自己分支开发然后提交到develop,测试没问题后再合并到master.
下面为测试没问题后需要把已经提交到develop的代码也转移到master
步骤:
1.git checkout master
2.git pull origin master
3.git checkout -b "分支名"
4.git cherry-pick '98d1ab9df9b'
----后面的数字字母为commit哈希值,如果有多个提交记录,则依次执行,
5.git push origin '分支名'
同创建的分支名
最后再提PR到master
end