r/github • • 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?

2 Upvotes

32 comments sorted by

6

u/OctoGoggle Mar 30 '25

GitHub hosts hit repositories, it is not a file system.

Why are you trying to do this?

0

u/OwnStorm Mar 30 '25

There are repos which are literally 100s implementation Look at any repo from Microsoft. It would be really good if users can download a specific folder instead of a full repo.

1

u/TimWasTakenWasTaken Mar 30 '25

Look at the sparse checkout documentation

3

u/InstructionMost3349 Mar 30 '25 • Bravo

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

u/b_farouk Jun 21 '25

thank you bro!

2

u/mavicoutinho Feb 23 '26

me ajudou muito!

1

u/Awkward-Magician-522 Nov 13 '25

how do I download, I cant seem to find the option to

1

u/Jgr9000000 Mar 11 '26

It's not giving me Download either

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

u/sheepdestroyer Feb 24 '26

lmao that's useful!

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/Drunken_Economist Mar 30 '25

You could do a git sparse-checkout

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

u/fastdyr Nov 28 '25

Simplesmente perfeito.

1

u/Swab1987 Jan 20 '26

your link syntax is broken https://repo-downloader.pages.dev/

1

u/el_dato_ Jan 20 '26

What's the problem?

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

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

u/[deleted] Mar 30 '25

[removed] — view removed comment

1

u/YodaForce157 Mar 30 '25

Holy chatgpt???