1. A仓库下添加另外一个仓库地址originB,命名为 originB
- git remote add originB <bpatch>
2. 从originB仓库中抓取数据到本仓库
- git fetch originB
3. 将originB仓库抓去的 feature-b 分支作为新分支checkout到本地,新分支名设定为 feature-b
- git checkout -b feature-b originB/feature-b
4. 切换回A仓库的 feature-a 分支
- git checkout feature-a
5. 将 feature-b 合并入 feature-a 分支
- git merge feature-a --allow-unrelated-histories