我几乎从来不只想获取某个远程的内容;我总是需要所有远程的内容。我认为这应该是一个很常见的用例,git应该已经考虑到了它(就像他们有pull.rebase true
一样)。
那么,是否有一种神奇的方法可以始终从我无法找到的所有远程获取内容?我的当前解决方案是使用别名,但我觉得肯定有更加传统的方式。
我几乎从来不只想获取某个远程的内容;我总是需要所有远程的内容。我认为这应该是一个很常见的用例,git应该已经考虑到了它(就像他们有pull.rebase true
一样)。
那么,是否有一种神奇的方法可以始终从我无法找到的所有远程获取内容?我的当前解决方案是使用别名,但我觉得肯定有更加传统的方式。
git remote update
命令会执行您描述的操作:
$ git remote --help
[...]
update
Fetch updates for a named set of remotes in the repository as
defined by remotes.<group>. If a named group is not specified on
the command line, the configuration parameter remotes.default will
be used; if remotes.default is not defined, all remotes which do
not have the configuration parameter