1.在需要合并的库上(K1)添加新的远程库(K2)地址
git remote add old url
2.拉取代码(K1)
git fetch --all
3.切换到K1的分支上
4.执行Merge
5.执行Commit
6.执行pull
如果遇到refusing to merge unrelated histories 添加--allow-unrelated-history选项(windows TortoseGit会弹出框提醒)