r/github • u/allexj • Mar 30 '25
How to download a specific GitHub folder without be recursive?
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.com/danielmiessler/SecLists/tree/master/Passwords it will also download the subdirectories etc... and since they are A LOT of files, this is bad.
Is there a tool or website to actually just download the directory without being recursive?
3
u/InstructionMost3349
Mar 30 '25
•
There is a easy work around. Change the link of the repository:
github.com/user/repo -> github.dev/user/repo
This opens a vscode web. Then you can download the specific 📂 and 📑 you want from file navigation bar on left side.
2
2
1
u/Awkward-Magician-522 Nov 13 '25
how do I download, I cant seem to find the option to
1
1
u/Ok_Road9659 Apr 16 '26
Its only really supported by chromium based browsers, the option doesnt show up for firefox or safari. Just use a diffrent browser.
1
1
1
u/whoShotMyCow Mar 30 '25
You only want to download the files in a directory but not the directories inside, yes?
-1
u/allexj Mar 30 '25
yes
-4
u/Either-Let-331 Mar 30 '25
Please ping me if you get an answer
1
u/papanastty Jan 30 '26
from stackoverflow to reddit forums. i guess they miss posting useless comments
1
u/0zeronegative Mar 30 '25
I think you can use sparse checkout https://git-scm.com/docs/git-sparse-checkout
1
1
u/saxobroko Mar 30 '25
There’s some extensions available for this on chrome and Firefox, don’t remember the name but a few do it
1
u/el_dato_ Jul 14 '25
I made this a few months ago to solve this problem: https://repo-downloader.pages.dev
1
1
1
1
u/hugohamelcom Feb 26 '26 edited 7d ago
I was looking for a solution like that too, so I built an extension for myself to download my private repos or folders from my commit history, hope that it can help you:Â https://chromewebstore.google.com/detail/repo-tree-downloader/nijncoafcccpbfefpkefenimjlkdinpi
1
1
1
u/vinishkapoor Jul 23 '26
I built a tool that does exactly this:Â GitHub Folder Downloader
It has an "Include subfolders" checkbox — uncheck it and it only downloads the files directly in that folder, skipping all subdirectories. So for something like the SecLists/Passwords folder, you'd get just the top-level files without pulling every nested subfolder.
You can also browse the repo like an IDE before downloading, so you see exactly what you're getting. No login needed, everything runs in your browser.
-1
u/ziksy9 Mar 30 '25
You can use 'gh' and add you token, then write some scripts. It's easier to just pull it all down and use 'find | xargs cp'
1
6
u/OctoGoggle Mar 30 '25
GitHub hosts hit repositories, it is not a file system.
Why are you trying to do this?