0

I want to download a specific folder from github using git command. I have tried many things.recent was below

cd <dir>
git init
git remote add origin -f <URL>
git config core.sparseCheckout true # enable this
cat >> .git/info/sparsecheckout
<folder>
git pull origin master

but no luck, entire repo got downloaded. can anyone help with this?

Harry
  • 1
  • 2
  • Does this answer your question? [Download a single folder or directory from a GitHub repo](https://stackoverflow.com/questions/7106012/download-a-single-folder-or-directory-from-a-github-repo) – ElasticCode Mar 12 '20 at 12:20
  • Does this answer your question? [How do I clone a subdirectory only of a Git repository?](https://stackoverflow.com/questions/600079/how-do-i-clone-a-subdirectory-only-of-a-git-repository) – phd Mar 12 '20 at 13:30
  • https://stackoverflow.com/search?q=%5Bgithub%5D+clone+single+folder – phd Mar 12 '20 at 13:30
  • Nothing Answers my question. i tried them . In sparsecheckout we have to add the local server path right not the github path right? – Harry Mar 13 '20 at 12:27

0 Answers0