3

Im currently working with pretty large projects in the size of GB. Is there any feature in git to pause my clone and save the files cloned until now and resume the clone sometime later. If not, is there a way for me to add that feature to git. Should it be added as a command option to

https://github.com/git/git

How is it generally approached when public developers add features to open source?

Shyam R
  • 473
  • 1
  • 5
  • 17
  • AFAIK Git operations are intended to be atomic, meaning they completely succeed or they completely fail. Not sure about `git clone`, but why do you want this feature? – Tim Biegeleisen Oct 26 '16 at 11:16
  • If I have a project of size 2gb. If my internet connection is not so fast. The cloning has completed until 90%. Suddenly due to power failure, I lose my connection to the repo and the process is aborted. In that case instead of cloning it again from the beginning, which downloads files, which already have been downloaded, I need to just download the things which are left right – Shyam R Oct 26 '16 at 11:19
  • 2
    Possible duplicate of [How to complete a git clone for a big project on an unstable connection?](http://stackoverflow.com/questions/3954852/how-to-complete-a-git-clone-for-a-big-project-on-an-unstable-connection) – Thilo Oct 26 '16 at 11:23
  • If you have a "source code" repository of that size, it's usually a good sign you're pushing too much into your source control... – Mladen B. Oct 26 '16 at 11:41
  • 2
    You probably want to start using Git LFS. LFS downloads will automatically resume (with file granularity). You really shouldn't be committing large binary files into normal git. – Chris Kitching Oct 26 '16 at 12:01
  • For the record, the `git` project has [instructions for submitting patches](https://github.com/git/git/blob/master/Documentation/SubmittingPatches) included in the documentation. – larsks Oct 26 '16 at 12:47

1 Answers1

0

If you were to use Git LFS (Large File Storage) for externalizing the big file, you could benefit from a more amendable clone since Git LFS 2.0 (released yesterday).

The clone would still be atomic, but the transfer queue associated with the large files is asynchronous now:

  • The Git Scanner is now asynchronous, initiating large uploads or downloads in the Transfer Queue immediately once an LFS object is found.
    Previously, the Transfer Queue waited until all of the Git commits have been scanned before initiating the transfer.
  • The Transfer Queue also automatically retries failed uploads and downloads more often.
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250