需求:将B项目的B分支合并到A项目的A分支,以idea操作为例
1.下载远程仓库1
git clone A
2.下载远程仓库2
git remote add mySecond B
3.把mySecond远程仓库数据拉取到本地
git fetch mySecond
4.在本地创建local分支并拉取mySecond代码到local,自动切换到local
git checkout -b local mySecond/master
git clone A
git remote add mySecond B
git fetch mySecond
git checkout -b local mySecond/master