Git 本地仓库推送多个远程仓库

版权声明:尊重原创,转载请附本文链接。谢谢合作! https://blog.csdn.net/DeMonliuhui/article/details/84789026

使用:

git remote add [name,默认:origin]  [url,远程仓库地址https]

可以给我们的本地仓库增加远程仓库的连接(推送)地址。
所以只要指定的[name] [url]都不一致,便可以给本地仓库增加多个远程仓库。

示例

如下图:
在这里插入图片描述

其他指令

推送到指定仓库的分支

git push -u [name,默认:origin]  [分支,默认:master]

删除远程仓库地址

git remote rm [name,默认是:origin]

查看远程仓库地址

 git remote -v

拉取远程仓库到本地仓库的分支

git pull [远程仓库name,默认是:origin]  [本地分支,默认:master]

猜你喜欢

转载自blog.csdn.net/DeMonliuhui/article/details/84789026