为单个项目添加多个远程仓库(Git操作)

书写代码时,有时候需要维护多个仓库,这时候就面对了这个需求,解决方法如下:

$ git remote add github  ******
$ git remote add mayun  ******

书写完成上边代码后,在输入

$ git remote -v

terminal中打印

mayun	https://gitee.com/***y.git (fetch)
mayun	https://gitee.com/***.git (push)
github	https://github.com/***.git (fetch)
github	https://github.com/*** (push)

此即为完成,打开路径下名为config的文件,出现信息:
config文件信息

   
   
   

友情链接:

技术博客        简书主页

原文地址:https://www.cnblogs.com/tig666666/p/8483813.html