简体   繁体   English

Git-如何从一个遥控器拉所有分支?

[英]Git - How can I pull all branches from a single remote?

There's git pull -all to pull all branches from maybe all remotes (?) or just the origin, but if I have another remote called spaceship , how can I pull all branches just from this remote? 有一个git pull -all可以从所有遥控器(?)或仅从原点拉所有分支,但是如果我有另一个名为spaceship遥控器,我怎么能从这个遥控器拉所有分支呢?

These are my attempts: 这些是我的尝试:

C:\DATA\Git\Repo>git pull --all spaceship
fatal: fetch --all does not take a repository argument

C:\DATA\Git\Repo>git pull spaceship --all
fatal: fetch --all does not take a repository argument

I've tried looking on SO but like all Git-related questions, 134 answers come back with 29 comments each and some guy going on for 2 pages about how Git works internally. 我试着研究SO,但是像所有与Git有关的问题一样,有134个答案每个都有29条评论,还有一些人继续讨论有关Git内部工作的2页内容。 Please, succinctly, what do I type in? 请简洁地输入什么?

Thanks. 谢谢。

您可以运行git fetch ,它将获取遥控器上的所有分支,然后可以使用git checkout branch切换到那些git checkout branch

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

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