要将A分支的一个commit合并到B分支:
首先切换到A分支
git checkout A
git log
找出要合并的commit ID :
commit 331cdbf28fba8343511ecbd29e704611bae70298
然后切换到B分支上
git checkout B
git cherry-pick 331cdbf28fba8343511ecbd29e704611bae70298
这样就将A分支的某个commit合并到了B分支了
要将A分支的一个commit合并到B分支:
首先切换到A分支
git checkout A
git log
找出要合并的commit ID :
commit 331cdbf28fba8343511ecbd29e704611bae70298
然后切换到B分支上
git checkout B
git cherry-pick 331cdbf28fba8343511ecbd29e704611bae70298
这样就将A分支的某个commit合并到了B分支了
本文标题:Git合并A分支的一个commit到B分支
本文链接:https://www.haomeiwen.com/subject/hhgavqtx.html
网友评论