Skip to content

Instantly share code, notes, and snippets.

@danieltomasz
Created June 15, 2018 21:46
Show Gist options
  • Save danieltomasz/564bc3218b5e5f2cf1bc83d37912373c to your computer and use it in GitHub Desktop.
Save danieltomasz/564bc3218b5e5f2cf1bc83d37912373c to your computer and use it in GitHub Desktop.
pull only subfolder from git repository
```
git init <repo>
cd <repo>
git remote add -f origin <url>
git config core.sparseCheckout true
echo "some/dir/" >> .git/info/sparse-checkout
echo "another/sub/tree" >> .git/info/sparse-checkout
````
git pull origin master
source is here
https://askubuntu.com/questions/460885/how-to-clone-git-repository-only-some-directories
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment