美文网首页
GIT关联多个远程库

GIT关联多个远程库

作者: 缺舟 | 来源:发表于2018-01-08 13:51 被阅读21次
    1. 打开终端并cd到目标文件

    2. 查看当前远程库git remote -v

        xxx1  https://gitee.com/###/###.git (fetch)
        xxx1  https://gitee.com/##/###.git (push)
      
    3. 添加新的远程库 git remote add xxxx2 https://gitee.com/**/***.git

    4. 查看当前远程库git remote -v

        xxx1  https://gitee.com/###/###.git (fetch)
        xxx1  https://gitee.com/##/###.git (push)
        xxx2  https://gitee.com/**/***.git (fetch)
        xxx2  https://gitee.com/**/***.git (push)
      
    5. 移除远程库:git remote rm xxx2

    6. 查看当前远程库git remote -v

        xxx1  https://gitee.com/###/###.git (fetch)
        xxx1  https://gitee.com/##/###.git (push)
      

    相关文章

      网友评论

          本文标题:GIT关联多个远程库

          本文链接:https://www.haomeiwen.com/subject/kmhbnxtx.html