+1  A: 

Use a shell script perhaps?

#!/bin/sh

for i in `git remote show`; do
    git fetch $i;
done;

Note: Small terminology error in your question: The --all option of git fetch|pull fetches all "remotes", not "remote branches".

Ramkumar Ramachandra
Thanks for the info on --all. Didn't realize that. +1 :)
Tom
Git 1.6.3 has `git remote update`, which is a builtin version of this. `git fetch --all` is preferred in the versions that have it because the *git remote* command is supposed to be for maintaining the configuration of remotes, not performing actions on them (`update` is an anomaly in this regard, thus the preference for `git fetch --all`).
Chris Johnsen
A: 

Figured I'd provide my own solution while I'm at it. I accepted Ramkumar's though, as it was the inspiration for this. The difference is I don't want to fetch from all remotes, but rather each remote branch in "origin"...


#!/bin/bash
REMOTE_BRANCHES=$(git branch -r | awk -F'/' '{print $2}')
for i in $REMOTE_BRANCHES; do
    git fetch origin $i
done

DISCLAIMER: haven't really implemented this yet, but it should be close.

Tom
You really should not try to parse the output of *git branch*. The lower-level “plumbing” command *git for-each-ref* is designed for scripted iteration over ref names. I am surprised that a plain `git fetch origin` does not update all of your “origin/*” remote-tracking branches. Iterated uses of `git fetch origin branch-name` will probably not do what you want either. When you give *git fetch* a refspec without a colon (the last arg is the refspec) it only stores the fetched commits in the special FETCH_HEAD ref (it will not update your remote-tracking branches).
Chris Johnsen
I see your point. I didn't know about the git for-each-ref command. Thanks!
Tom