简体   繁体   English

git remote 用于获取和推送的不同遥控器

[英]git remote different remotes for fetch and push

when I do git remote -v I get当我做git remote -v我得到

origin  git@xxx.yyy.cc:name fetch)
origin  git@xxx.yyy.cc:name (push)

Why there are two separate entries for fetch and push remotes?为什么fetchpush遥控器有两个单独的条目? What would be the case where someone would want a different remotes for these two actions?如果有人想要为这两个操作使用不同的遥控器,情况会怎样?

As this helpful blog discusses, one case where you would want separate remotes for fetching and pushing is if you forked someone else's repository.正如这篇有用的博客所讨论的那样,您需要单独的遥控器来获取和推送的一种情况是,如果您分叉了其他人的存储库。 In this case, you would want to pull from the main repository and then push to yours.在这种情况下,您可能希望从主存储库中拉取,然后推送到您的存储库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM