pause git clone and resume later?

29,749

Solution 1

Assuming it's a normal git clone, I'm afraid that they're not resumable, as far as I know. To add support for resumable git clone / git fetch has been a suggested project for the Google Summer of Code in the past.

One exception is if you're actually doing a git svn clone, then you can restart it by changing into the directory and running git svn fetch, but I assume that this is just a normal git repository you're cloning. For some other ideas of how to work around this, you might want to try the suggestions in the answers to this question:

Solution 2

Depending on your situation (e.g. if you want to close your laptop and / or switch networks), stopping the process (using Ctrl-Z) and resuming it (using fg) might work for you.

Share:
29,749

Related videos on Youtube

황현정
Author by

황현정

Updated on July 10, 2022

Comments

  • 황현정
    황현정 about 1 year

    Is there a way to pause git clone and resume it later? I'm cloning a really big repo (around 2GB) and my PC's been turned on for more than 40 hours. I have school to catch later, I don't want to leave it like this. Anybody got an idea? It's already at 67% btw. :(

  • 황현정
    황현정 almost 12 years
    ha! Thank you! I did look around google but didn't find any clear cut answers. I'm afraid it's a normal git clone. But thanks for informing me about git svn... :D
  • 황현정
    황현정 almost 12 years
    btw.. The git clone just finished minutes after your post. Oh my, am I lucky. Anyhow, thanks sir, I'll try to remember that.
  • Mark Longair
    Mark Longair almost 12 years
    Great, I'm glad to hear that worked out.
  • Abe Voelker
    Abe Voelker over 11 years
    Or, if the computer is about to shutdown (and you are running Linux), you can use something like CryoPID
  • ArunMKumar
    ArunMKumar about 10 years
    This worked for me, and i have been doing that... stop the process, put the PC into hibernation and resume the process.
  • Antonio Ragagnin
    Antonio Ragagnin about 9 years
    September 2014: any news?
  • Anticro
    Anticro about 3 years
    After "fg" git told me the pipe was broken. So it did not work for me. But the idea itself is nice one.
  • Xiidref
    Xiidref over 1 year
    You saved me for the git svn part thank you a lot !