git 如何在自己分支合并其他远端分支代码,如何只合并指定的commit 赵小空 2023-09-14 39 阅读1分钟 场景1: feature-A分支有3个commit a b c test分支需要合并A分支的commit b # 切换到 master 分支 git checkout master # Cherry pick 操作 $ git cherry-pick b 场景2: test分支直接合并远端A分支代码 # 切换到 test 分支 git checkout test $ git merge origin/A