Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Quiet git remote update?

Tags:

git

ruby

I am trying to quiet the git remote update command in my Ruby script.

I used the --quiet flags of other Git commands like git checkout [branch_name].

For some reason Git doesn't have that flag when doing a git remote update. Does anybody know any other way?

I have also tried to put the output to /dev/null like git checkout [branch_name] < /dev/null.

I am open to any Ruby or command line suggestions.

like image 211
wallerjake Avatar asked Nov 01 '22 05:11

wallerjake


1 Answers

If you want output to go to /dev/null, use:

git checkout [branch_name] > /dev/null

or

git checkout [branch_name] &> /dev/null

The way you wrote it, you are expecting input from /dev/null.

like image 198
Michael Kohl Avatar answered Nov 15 '22 05:11

Michael Kohl