Created
May 11, 2021 09:52
-
-
Save Flouse/a441171596c4fdeed40c481934aa3118 to your computer and use it in GitHub Desktop.
Clone part of a git project
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
# https://stackoverflow.com/a/28039894/7365437 | |
git init <repo> | |
cd <repo> | |
git remote add origin <url> | |
git config core.sparsecheckout true | |
echo "path/to/your/dir/*" >> .git/info/sparse-checkout | |
git pull --depth=1 origin branch_you_want |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment