Is there any way to continue Git clone from the point where it failed?

后端 未结 3 380
失恋的感觉
失恋的感觉 2020-12-06 04:35

I was cloning the open embedded project yesterday. Because of connection problems, the cloning failed. I started the command again and cloning started from the beginning.

3条回答
  •  执念已碎
    2020-12-06 05:08

    Note: for project including submodules, git 2.9.1 (July 2016) can help.

    See commit bb9d91b (09 Jun 2016), and commit 665b35e (10 Jun 2016) by Stefan Beller (stefanbeller).
    (Merged by Junio C Hamano -- gitster -- in commit bb2d8a8, 11 Jul 2016)

    submodule--helper: initial clone learns retry logic

    Each submodule that is attempted to be cloned, will be retried once in case of failure after all other submodules were cloned.
    This helps to mitigate ephemeral server failures and increases chances of a reliable

    If the retry fails, the error message will be:

    Failed to clone '%s' a second time, aborting
    

    clone of a repo with hundreds of submodules immensely.

提交回复
热议问题