Roy Truelove
Roy Truelove

Reputation: 22456

Always `git fetch --all`?

There's pretty much never a case when I'd want to only fetch for a certain remote; I'd always want all remotes. I would think this would be a common-enough use case that git would have accounted it for (same way they have pull.rebase true).

So, is there a magic way to always fetch from all remotes that I have been unable to find? My current solution is to use an alias but I feel as though there must be a more conventional way.

Upvotes: 3

Views: 427

Answers (1)

larsks
larsks

Reputation: 311720

The git remote update command will do what you describe:

$ 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

Upvotes: 3

Related Questions