Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for git sparse-checkout #366

Open
nikhedonia opened this issue Jan 19, 2020 · 1 comment
Open

add support for git sparse-checkout #366

nikhedonia opened this issue Jan 19, 2020 · 1 comment

Comments

@nikhedonia
Copy link
Collaborator

nikhedonia commented Jan 19, 2020

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.

@nikhedonia
Copy link
Collaborator Author

nikhedonia commented Apr 13, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant