Is it possible to get a progress bar when doing a git clone
? I'm wondering because I am currently doing a git clone that has taken a few minutes so far and would be curious to know if it is going to finish soon.
Cloning a Repository. The git clone command initializes a new repository with the contents of another one and sets up tracking branches in the new repository so that you can easily coordinate changes between the two with the push/pull mechanism.
To speed up git clone make sure you set the `--depth` option to 1 so you don't get the entire repository history. This is *very* useful when cloning repos in your CI. In a scripted Jenkins pipeline you can achieve this with a single property.
Cloning an entire repo is standard operating procedure using Git. Each clone usually includes everything in a repository. That means when you clone, you get not only the files, but every revision of every file ever committed, plus the history of each commit.
Not really. There are various stages to git clone
:
Stage 1 involves walking through the commit graph from each branch head finding all the commits and associated objects: since there is no idea beforehand of how many commits there are, the progress of this can't be gauged. Sadly this is often where a lot of the time in a clone operation is taken up.
Stage 2 does have a progress counter, although it counts objects rather than volume (so its rate varies, especially if the repo has large blobs)
Stages 3 and 4 have progress counters, although they are usually much faster than the previous two stages.
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