This is probably obvious and has been asked many times in different ways before, but I have not been able to find the answer after searching for some time.
Assume the following:
How do I efficiently pull or fetch the last committed versions of, say, DIR001/subdir2/fileB1 ... DIR001/subdir2/fileBN from the remote repository and nothing else?
AND
just the last committed version of a single file from DIR001/subdir2/fileB1 ... DIR001/subdir2/fileBN from the remote repository and nothing else?
AND
How do I efficiently pull or fetch a previously committed version of a subset of said files and nothing else?
Maybe fetch/pull is not the correct command for this.
The answer to "Partial cloning" can help you start experimenting with shallow clones.
But it will be limited:
The real solution would be to separate the huge remote repo into submodules though.
See What are Git limits or Git style backup of binary files for illustrating this kind of situation.
Update April 2015:
Git Large File Storage (LFS) would make pull/fetch much more efficient (by GitHub, April 2015).
The project is git-lfs (see git-lfs.github.com) and tested with server supporting it: lfs-test-server:
You can store metadata only in the git repo, and the large file elsewhere.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With