GIT关联多个远程库

2018-01-08  本文已影响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)
    
上一篇 下一篇

猜你喜欢

热点阅读