Created
October 15, 2015 18:53
-
-
Save brandedoutcast/3a2e18eb2185ef2b5465 to your computer and use it in GitHub Desktop.
How to do a sparse checkout in git
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir [RepoName] | |
git init | |
cd [RepoName] | |
git remote add -f origin [RepoURL] | |
git config core.sparseCheckout true | |
echo "some/dir/*" >> .git/info/sparse-checkout | |
echo "another/sub/tree/*" >> .git/info/sparse-checkout | |
git checkout master | |
or | |
git pull origin master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment