git push/pull多个远程仓库

2019-10-23  本文已影响0人  大绵羊gg

 1、关联仓库

git remote add <refs> <addr>

可以关联多个

举例:

git remote add coding git@git.coding.net:**/**.git

git remote -v ,可查看现在关联的代码仓库

2、代码push

逐一push

git push <refs> <branch> (push 默认origin)

全部push

.git/config发现origin下新加入了这个远程仓库的url

[remote"origin"]

url=git@git.coding.net:***.git

3、代码pull

git pull <refs> <branch>

git pull  origin master 更新origin仓库的maste分支

上一篇 下一篇

猜你喜欢

热点阅读