buckaroo
buckaroo copied to clipboard
add support for git sparse-checkout
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.
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