There is a git repo that I wanted to clone, but it has many large files in it that I am not interested in. I looked at "sparse checkout" to get only one folder, but that still downloads many gigabytes so it's pointless.
I tried cloning using the --filter
option - my first attempt again downloaded the whole thing but adding --no-checkout
downloaded much less:
git clone --depth=1 --no-checkout --filter=blob:limit=2m
But there were no files in the repo (besides the .git
folder which was now a more manageable 1GB).
So how do I get the files, without the large ones? Doing git checkout master
gets the full repo again. Adding the filter to that command gives me an "unknown option" error. Same for git pull
with the filter.