Progress indicator for git clone

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.

  • When should pdf files be tracked in a Git repository and when not
  • How to discard change to git submodule?
  • insert mode Gcommit fugitive
  • How can I update bugzilla entries from GitHub?
  • How to Add a File in .git Directory to Track It?
  • Jenkins Git Plugin not pulling latest changes before building job
  • Git: How to revert a force push
  • Git says I deleted photos that I put inside a new folder?
  • How to recover corrupt git repository?
  • How to checkout a specific commit and save in another folder
  • Ignore files from git diff or git status using command shell
  • Git push origin master having publickey issues
  • 5 Solutions collect form web for “Progress indicator for git clone”

    Not really. There are various stages to git clone:

    1. discover the objects that need to be sent (“Counting objects: nnn”)
    2. compress and send those objects
    3. index the received pack
    4. check out received files

    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.

    You can do:

       du -s .git

    to monitor changes in the size of temporary content to get an idea.

       watch du -s .git

    allows you to monitor without having to retype the command. Something like the one-liner below will give periodically you the data accumulation rate in kB per second:

        delay=5; prev=`du -sk .git/ | cut -f 1`; sleep $delay; while true; do  cur=`du -sk  .git/ | cut -f 1`; expr \( $cur - $prev \) / $delay ; prev=$cur; sleep $delay; done

    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.

    With Git 2.10 (Q3 2016), git clone --progress will be more verbose.

    See commit 38e590e by Jeff King (peff)
    (Merged by Junio C Hamano in commit a58a8e3 Aug. 4th 2016)

    clone: use a real progress meter for connectivity check

    Because the initial connectivity check for a cloned
    repository can be slow, 0781aa4 (clone: let the user know
    when check_everything_connected is run, 2013-05-03) added a
    “fake” progress meter; we simply say “Checking connectivity
    when it starts, and “done” at the end, with nothing between.

    Since check_connected() now knows how to do a real progress
    meter, we can drop our fake one and use that one instead.

    You might want to take a look at the folder


    While cloning, there should be a file starting with tmp_pack_. It contains the currently downloading git pack.

    With this information you might be able to eyeball the duration.

    How about git clone --progress ?

    Git Baby is a git and github fan, let's start git clone.