1.背景
由于原来有一个git库;但原来的git库无法满足新的要求。故又搭建了一个Gerrit库。在Gerrit库安装并上传代码后,原来的版本库又进行了修改。于是,产生了合并代码库的需求。
2.做法
1)下载Gerrit库(合并目标)
git clone (目标库地址)
2)增加需要合并的地址
git remote add (命名) (合并库地址)
3)更新合并库
git fetch (命名) master:(命名)
4)合并
git merge (命名) master
5)push到远程目标库
git push origin master
参考文献:
1)https://blog.csdn.net/qq_21383435/article/details/91490653