git 合并不同库的代码
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会弹出框提醒)
本文来自博客园,作者:广林,转载请注明原文链接:https://www.cnblogs.com/guanglin/p/14258639.html