简体   繁体   中英

Choose specific origin from multiple git remotes

On my local repository git remote -v gives the following output.

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

Repo has 2 remotes but names are equal. How to push only to one of remote? If I specify git push origin branch it still pushes to both remotes. Also If I need to rename one of them how to do that?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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