以repo1合并到repo2为例,总体来说有4步:
在repo2 clone到本地的代码目录中:
1. git remote add repo1 <repo1地址>
2. git fetch repo1
3. git branch repo1 repo1/master (仍在master branch) 或者git checkout -b repo1 repo1/master (会进入到repo1branch)
4. 在master branch执行: git merge repo1
参考文章
https://www.cnblogs.com/drizzlewithwind/p/8951910.html
https://www.jianshu.com/p/da2ba8bb0448