11/2/2022 0 Comments Pull one file from master git![]() ![]() ![]() Presumably because the -filter=combine: composite filter (added in Git 2.24, implied by multiple -filter) is not yet implemented. But on my test that fails with: fatal: invalid filter-spec 'combine:blob:none tree:0' Where -filter=tree:0 from Git 2.20 will prevent the unnecessary clone fetch of all tree objects, and allow it to be deferred to checkout. Then, the git sparse-checkout set command fetches only the missing blobs (files) from the server:Įven better, later on GitHub will likely start supporting: -filter=blob:none \ the the three directories d1, d2, master.a single commit object with the tip of the master branch.You can also only download certain files with the much more understandable: git clone \īut that method for some reason downloads files one by one very slowly, making it unusable unless you have very few files in the directory.Īnalysis of the objects in the minimal repository The sparse-checkout part is also needed unfortunately. a small directory with 1000 files of size one byteĪll contents are pseudo-random and therefore incompressible.Here's a less minimal and more realistic version at git clone \ #Pull one file from master git updateThis option was added together with an update to the remote protocol, and it truly prevents objects from being downloaded from the server.Į.g., to clone only objects required for d1 of this minimal test repository: I can do: git clone \ Git clone -filter from git 2.19 now works on GitHub (tested, git 2.30.0) ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |