I'm adding multiple and large files into a repo.
git add .
It is taking a lot of time. Is there any way I can display the progress bar, so that I can know how much of the files is already added to the repo?
No progress-bar, but, at least, you will get some feedback and see which files have already been added:
git add --verbose .
Here is a one-liner, that calculates the progress percentage every second:
git add --verbose . > ../progress.txt & percent=0; while [[ $percent -le 99 && $percent -ge 0 ]]; do num1=$(cat ../progress.txt | wc -l); num2=$(find . -type f -not -path "./.git/*" | wc -l); percent=$((num1*100 / (num2 - 3) )); echo $percent"%"; sleep 1; done; echo "DONE"; sleep 1; rm ../progress.txt
git add
generated ( num1 ).git/*
( num2 )Example output:
12%
25%
50%
50%
75%
75%
100%
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With