Does git-clone have resume capability?

16

4

Does the git-clone command have resume capability? If it gets interrupted while I'm downloading a large repository will it resume if I give the same command again?

user167020

Posted 2012-11-29T05:15:55.713

Reputation:

For TL;DR, find usage example in https://stackoverflow.com/q/38618885 and https://stackoverflow.com/q/9268378

– rwong – 2019-02-08T22:27:08.740

2

Similar question: How to complete a git clone for a big project on an unstable connection?

– sleske – 2013-03-06T22:45:17.673

Answers

10

No, cloning cannot be resumed, if it's interrupted you'd need to start over. If you suspect that there's a good chance that your clone may be interrupted, look for a git bundle that you can download using a protocol that can be resumed. You could then use that to create the initial clone, and use the actual repository to keep up to date.

qqx

Posted 2012-11-29T05:15:55.713

Reputation: 2 603

0

i faced the same issue with a bad internet connection. So i came up with the following solution: Created a small php file on my server to download the package as a zip file:

<?php
$url = "https://codeload.github.com/CocoaPods/Specs/zip/master";
file_put_contents("coco.zip", fopen($url, 'r'));
?>  

<a href="coco.zip">coco.zip</a>

then download the zip file using any download manager that supports resume

Hassan

Posted 2012-11-29T05:15:55.713

Reputation: 1