Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to totally suppress Git Clone output?

Tags:

git

shell

I am writing a shell script wherein I am doing

log=/var/tmp/git_prod_test_pack/log.out
Time_clone=`(/usr/bin/time -f'%e' git clone --quiet ssh://id@xxxxxxxxxx) 2>&1 >> $log`
echo $Time_clone

It is giving output as Total 104 (delta 0), reused 104 (delta 0) 0.17

How can I totally suppress this output and get only 0.17 ?

like image 965
devops Avatar asked Oct 22 '25 14:10

devops


1 Answers

git clone --quiet https://github.com/dask/dask.git does not produce any output unless you have errors. Your code should work fine, unless you have some bug in the (older) git you use or some weird config of your shell.

like image 108
Philippe Ombredanne Avatar answered Oct 25 '25 05:10

Philippe Ombredanne



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!