0

For reasons I haven't pinpointed yet (probably poor internet connection), I am constantly having issues pulling from a Git-LFS repository. The pulls fail partway through pull, and what I'm wondering is whether there is a way to "continue" the pull from where it stopped. If it is in fact an internet connection issue, then it's unlikely that I'll be able to pull the entire repository in one go. I haven't been able to find a solution to this, every similar question I've looked at suggests that it is a broken pull and that I'd need to revert and do it again.

Does anyone know whether I can do some kind of "consistency check" where Git-LFS will verify which files are missing from that version and attempt to pull them from the server? Anything along those lines would be helpful here, since starting over just results in another failure several minutes later. Also, if this cannot in fact be done, are there any recommendations of alternative solutions? This is a 1.12GB repository that practically never changes, only gets added to, and which is currently submoduled into another regular Git repository. Specifically, it is a repository used to keep testing resources, which are very large and unnecessary for a regular distribution of the system in question. I've thought of just zipping it and storing it in any old file host like Google Drive, but of course that misses the advantages of a proper versioning system.

1 Answers1

0

You can just run git lfs pull if the checkout fails. Any objects that you've already downloaded will have been saved in your repository, and you can continue to run git lfs pull until it completes successfully. Assuming the server supports the standard range requests, you can even resume individual objects.

Do note that Git LFS will retry failing downloads automatically, which will help, but depending on the reliability of your network connection, that may not be enough. You can set lfs.transfer.maxretries to a larger number (it defaults to 8) if you'd like to use more retries automatically.

bk2204
  • 64,793
  • 6
  • 84
  • 100