Skip to content

Instantly share code, notes, and snippets.

@mvillafuertem
Created October 21, 2020 17:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mvillafuertem/404ff2be0db87432add8f6c929b280ca to your computer and use it in GitHub Desktop.
Save mvillafuertem/404ff2be0db87432add8f6c929b280ca to your computer and use it in GitHub Desktop.
Works in git 2.28
git clone --filter=blob:none --no-checkout --depth 1 --sparse <project-url>
cd <project>
git sparse-checkout init --cone
Specify the files and folders you want to clone
git sparse-checkout add <folder>/<innerfolder> <folder2>/<innerfolder2>
git checkout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment