Making tracking upstream Git repositories a bit quieter
I track a bunch of upstream Git repositories, where by 'track' I
mean that I keep a local copy and update it periodically. By now I
have enough of these tracking repositories that updating them all
with a straightforward '
git pull --ff-only' (sometimes through
an alias) is increasingly noisy, with too much
output. This is especially so for the most active repositories,
such as my copy of the Linux kernel; a normal '
git pull' on the
Linux kernel can easily produce more than a hundred lines of output
(sometimes several hundred). Over the past week I've been trying to
hunt around in Git to reduce the amount of normal output, with only
The two obvious steps I've taken are to set the 'git fetch' output
to its compact mode with '
git config fetch.output compact' and,
for some very active repositories, to turn off diffstat output
(which lists files modified, added, and removed) with '
merge.stat off'. However, this is still relatively verbose in two
areas. First, for all repositories you get the four standard lines
of 'remote:' messages that report the progress of the fetch. Second,
for some repositories, I get a churn of branches being created and
As far as I know, there's no way to turn off only the remote progress
reporting short of feeding standard output and standard error from '
pull' (or a direct '
git fetch') through a pipe to, say,
can silence everything with '
git fetch -q' but that's potentially
quite extreme; in many repositories I want to know about new tags and
new branches because they're important markers of things happening. If
I was willing to lose those, I could get a very minimal output with
get fetch -q && git pull', which produces either 'Already up to date'
or two lines of 'Updating ...' and 'Fast-forward'.
Knowing that an update happened is important in some repositories, because I'll then go read the commit messages. In others, it's just noise (although at two lines, tolerable noise). This surfaces the small issue that I'm not actually sure what I want in quiet 'git pull' output, and it's almost certainly different in different repositories. I interact quite differently with my copy of the Linux kernel than I do with, say, my copy of OpenZFS on Linux.
Comments on this page:Written on 27 January 2021.