绑定多个远端仓库
绑定第一个仓库,能够正常推送拉取
$ git remote add orgin https://gitee.com/enilu/material-admin.git
绑定第二个仓库,只做推送
$ git remote set-url --add origin https://github.com/enilu/material-admin.git
这个时候查看远端仓库信息会有两个 Push 的远程仓库
$ git remote -v
orgin https://github.com/MeterosBehind/MyJava.git (fetch)
orgin https://github.com/MeterosBehind/MyJava.git (push)
orgin https://gitee.com/youngforever1728/my-java.git (push)
之后再进行 add commit push 即可,会将代码同时 Push 到两个远程仓库中
转载请注明来源,欢迎对文章中的引用来源进行考证,欢迎指出任何有错误或不够清晰的表达。可以在下面评论区评论,也可以邮件至 470501267@qq.com