admin管理员组文章数量:1356701
I know these two amazing websites to do that easily: Download Directory and DownGit.
The problem is that they both work recursively, so if I for example give this link: it will also download the subdirectories, which is not ideal in my case, since there are A LOT of files.
Is there a tool or website to just download a directory without its subdirectories?
I know these two amazing websites to do that easily: Download Directory and DownGit.
The problem is that they both work recursively, so if I for example give this link: https://github/danielmiessler/SecLists/tree/master/Passwords it will also download the subdirectories, which is not ideal in my case, since there are A LOT of files.
Is there a tool or website to just download a directory without its subdirectories?
Share Improve this question edited Mar 30 at 8:29 dani-vta 7,5007 gold badges49 silver badges65 bronze badges asked Mar 30 at 8:05 allexjallexj 1274 bronze badges 3- 1 So you want to download the files in /Passwords, but not in /Passwords/Books etc? – Martheen Commented Mar 30 at 8:13
- exactly that's what I want – allexj Commented Mar 30 at 8:17
- @allexj did my post answer your question or are you still having issues with it? – dani-vta Commented yesterday
1 Answer
Reset to default 2To download just a subset of a repository, you could perform a sparse
clone and then use the sparse-checkout
command.
The sparse clone will download only the top level directory of your repository, while sparse-checkout
will incrementally grow the working directory with just the content you're interested in.
# clone just the top level directory of your repo
git clone --sparse <URL> -- myrepo
# cd into the repo
cd myrepo/
# provide the subcommand set with a list of patterns to checkout,
# in your case just 'Passwords' without its subfolders
git sparse-checkout set --no-cone Passwords '!Passwords/*/**'
本文标签: gitHow to download a specific GitHub folder without its subdirectoriesStack Overflow
版权声明:本文标题:git - How to download a specific GitHub folder without its subdirectories? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1743993674a2572605.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论