Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between git -q pull and git pull?

Tags:

git

github

I've seen this on a question about a git cronjob where git -q pull origin master was being used. But I simply can't find anything on what the -qparameter does? What difference is there in using, for example: git pull origin master vs git -q pull origin master?

Also does this parameter have some effect on the git push command?

like image 704
CMPSoares Avatar asked May 29 '26 21:05

CMPSoares


2 Answers

Note: git -q pull wouldn't work.

The git command itself has no -q parameters.

git pull does:

git pull -q origin master

Even though it isn't fully quiet:

It is actually only "quiet" if no problems are found

If unmerged error occurs, output is seen on BOTH stdout and stderr.

See also "Can git operate in “silent mode”?"

like image 168
VonC Avatar answered May 31 '26 15:05

VonC


It's simply a flag for "quiet", as stated in the official documentation for git pull

-q
--quiet

This is passed to both underlying git fetch to squelch reporting of during transfer, and underlying git-merge to squelch output during merging.

You can also find this information in your terminal (assuming that you're using a *nix operating system) with man git-pull.

Push has this option too.

like image 35
nerdwaller Avatar answered May 31 '26 15:05

nerdwaller



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!