Hi,
is it possible to make git silent, when nothing interesting is happening?
I have a lot of repos and a batch script to update them all, and I want to get rid of 'Fetching origin' and 'Already up-to-date.' messages leaving only new refs and tags.
threads / discuss / 44100
Subject: [wishlist] disable boring messages
Hi,
is it possible to make git silent, when nothing interesting is happening?
I have a lot of repos and a batch script to update them all, and I want to get rid of 'Fetching origin' and 'Already up-to-date.' messages leaving only new refs and tags.
Re: [wishlist] disable boring messages
Hi!
Alexander Inyukhin <shurick@sectorb.msk.ru> wrote:
> I have a lot of repos and a batch script to update them all, > and I want to get rid of 'Fetching origin' and 'Already up-to-date.' > messages leaving only new refs and tags.
There is an option `-q`, but it's too silent :)
As far as I can see, `git fetch` prints 'Fetching origin' etc to stdout, and new refs/tags to stderr (don't ask me why). So
git fetch blabla > /dev/null should probably do the job.
Now, if you collect and save those logs, you may need some shell-fu to redirect that stderr to stdout, but not to /dev/null. Something like
(git fetch blabla > /dev/null) 2>&1
(run `git fetch` in a subshell)...
-- Mit freundlichen Grüßen, Anatoly Borodin