pause git clone and resume later? [duplicate]

别来无恙 提交于 2019-11-30 12:57:05

问题


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. :(


回答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:

  • How to complete a git clone for a big project on an unstable connection?



回答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.



来源:https://stackoverflow.com/questions/7805274/pause-git-clone-and-resume-later

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!