繁体   English   中英

从多个git遥控器中选择特定的来源

[英]Choose specific origin from multiple git remotes

在我的本地存储库git remote -v提供以下输出。

origin  https://gitlab.com/***.git (fetch)
origin  https://gitlab.com/***.git (push)
origin  https://github.com/***.git (push)

回购有2个遥控器,但名字相同。 如何只推到一个远程? 如果我指定git push origin branch它仍然会推送到两个遥控器。 另外如果我需要重命名其中一个如何做到这一点?

您可以推送到网址, git push https://gitlab.com/example/repo branch ,查看其文档,您可以在配置中取消设置单个密钥,查看其文档, git config --unset remote.origin.url .*theoneidontwant.*

暂无
暂无

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

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