Open nikhedonia opened 4 years ago
This is how one can initialize a git repository and fetch just a subset of files:
git clone only one folder:
git init
git remote add origin $GIT_URL
git checkout -b master
git config core.sparsecheckout true
echo include/* >> .git/info/sparse-checkout # inclusion pattern
echo src/* >> .git/info/sparse-checkout # second inclusion pattern
git pull origin master --depth=N # branch which you want to pull
add support for
git sparse-checkout
is a new feature that allows partial checkouts of a git repository. This can greatly speedup the download and install phase as we can exclude folders that are not needed. Furthermore this allows also to conveniently split mono-repos into multiple packages.