mkdir {{workdir}}
cd {{workdir}}
git init
git remote add origin {{gitUrl}}
git config core.sparseCheckout true
echo "{{clonedSubdir}}/{{clonedSubSubdir}}" >> .git/info/sparse-checkout
git pull origin
git checkout {{workingBranch if not master}}
Last active
August 20, 2019 10:43
-
-
Save sofyan-ahmad/4ec9cd79c8641bd25479bcea7b73f282 to your computer and use it in GitHub Desktop.
Git Clone Sub-Directory Only
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment