每次都执行 `git fetch --all`?

3

我几乎从来不只想获取某个远程的内容;我总是需要所有远程的内容。我认为这应该是一个很常见的用例,git应该已经考虑到了它(就像他们有pull.rebase true一样)。

那么,是否有一种神奇的方法可以始终从我无法找到的所有远程获取内容?我的当前解决方案是使用别名,但我觉得肯定有更加传统的方式。


1
谢谢larsks,你能写一篇正式的回答来确认吗? - Roy Truelove
1个回答

3
< p > 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

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接