[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"content:legacy:page:\u002Fposts\u002Fgit\u002Fdownload-specific-folder":3,"content:legacy:navigation":261,"content:legacy:surround:\u002Fposts\u002Fgit\u002Fdownload-specific-folder":546,"content:related-articles:Download a specific folder on GitHub repository":549},{"id":4,"title":5,"aside":6,"body":7,"categories":6,"category":203,"description":245,"duration":246,"extension":247,"footer":6,"header":6,"icon":6,"image":248,"main":6,"meta":251,"navigation":6,"path":252,"publishedAt":253,"seo":254,"sitemap":255,"stem":256,"tags":257,"toc":6,"top":259,"__hash__":260},"content\u002Fposts\u002Fgit\u002Fdownload-specific-folder.md","Download a specific folder on GitHub repository",null,{"type":8,"value":9,"toc":239},"minimark",[10,15,19,23,28,53,57,62,88,93,97,102,149,153,157,176,180,185,189,194,224,228,232,235],[11,12,14],"h2",{"id":13},"introduction","🚀 Introduction",[16,17,18],"p",{},"When working with GitHub repositories, you may sometimes need to download specific folders without cloning the entire repository. This can be useful when you only need a subset of files or directories from a repository. There are several ways to achieve this, including using the GitHub web interface, the svn command, the GitHub API, third-party tools, GitHub CLI, and Git archive.",[11,20,22],{"id":21},"methods","🌿 Methods",[24,25,27],"h5",{"id":26},"_1-downloading-from-the-github-web-interface","1. Downloading from the GitHub Web Interface",[29,30,31,35,38,41],"ul",{},[32,33,34],"li",{},"Navigate to the repository on GitHub.",[32,36,37],{},"Browse to the folder you want to download.",[32,39,40],{},"Click on the folder to open it.",[32,42,43,44,48,49,52],{},"Click the ",[45,46,47],"strong",{},"\"Download\""," button or the ",[45,50,51],{},"\"Download ZIP\""," button if available. This method is limited as it often requires repository owners to set up releases or provide download links.",[24,54,56],{"id":55},"_2-using-the-svn-command","2. Using the svn Command",[29,58,59],{},[32,60,61],{},"You can use Subversion (SVN) to download specific folders. This method does not require cloning the entire repository.",[63,64,69],"pre",{"className":65,"code":66,"language":67,"meta":68,"style":68},"language-sh shiki shiki-themes github-light github-dark","svn export https:\u002F\u002Fgithub.com\u002Fowner\u002Frepo\u002Ftrunk\u002Fpath\u002Fto\u002Ffolder\n","sh","",[70,71,72],"code",{"__ignoreMap":68},[73,74,77,81,85],"span",{"class":75,"line":76},"line",1,[73,78,80],{"class":79},"sScJk","svn",[73,82,84],{"class":83},"sZZnC"," export",[73,86,87],{"class":83}," https:\u002F\u002Fgithub.com\u002Fowner\u002Frepo\u002Ftrunk\u002Fpath\u002Fto\u002Ffolder\n",[29,89,90],{},[32,91,92],{},"Replace owner, repo, and path\u002Fto\u002Ffolder with the appropriate values.",[24,94,96],{"id":95},"_3-using-github-api","3. Using GitHub API",[29,98,99],{},[32,100,101],{},"You can use GitHub's API to download specific folders by fetching the contents of the folder as a ZIP file. This requires some scripting. Here is an example using curl and jq:",[63,103,105],{"className":65,"code":104,"language":67,"meta":68,"style":68},"curl -L https:\u002F\u002Fapi.github.com\u002Frepos\u002Fowner\u002Frepo\u002Fcontents\u002Fpath\u002Fto\u002Ffolder | jq -r '.[] | select(.type == \"file\") | .download_url' | xargs -n 1 curl -O\n",[70,106,107],{"__ignoreMap":68},[73,108,109,112,116,119,123,126,129,132,134,137,140,143,146],{"class":75,"line":76},[73,110,111],{"class":79},"curl",[73,113,115],{"class":114},"sj4cs"," -L",[73,117,118],{"class":83}," https:\u002F\u002Fapi.github.com\u002Frepos\u002Fowner\u002Frepo\u002Fcontents\u002Fpath\u002Fto\u002Ffolder",[73,120,122],{"class":121},"szBVR"," |",[73,124,125],{"class":79}," jq",[73,127,128],{"class":114}," -r",[73,130,131],{"class":83}," '.[] | select(.type == \"file\") | .download_url'",[73,133,122],{"class":121},[73,135,136],{"class":79}," xargs",[73,138,139],{"class":114}," -n",[73,141,142],{"class":114}," 1",[73,144,145],{"class":83}," curl",[73,147,148],{"class":114}," -O\n",[29,150,151],{},[32,152,92],{},[24,154,156],{"id":155},"_4-using-third-party-tools","4. Using Third-Party Tools",[29,158,159],{},[32,160,161,162],{},"There are various third-party tools available that can help you download specific folders from GitHub repositories:\n",[29,163,164,170],{},[32,165,166,169],{},[45,167,168],{},"GitZip",": A web-based tool that allows you to download specific folders or files from GitHub.",[32,171,172,175],{},[45,173,174],{},"DownGit",": Another web-based tool that lets you generate download links for specific folders or files in a GitHub repository.",[24,177,179],{"id":178},"_5-using-github-cli","5. Using GitHub CLI",[29,181,182],{},[32,183,184],{},"Although GitHub CLI does not natively support downloading specific folders, you can use it in combination with other tools or scripts to achieve the same result.",[24,186,188],{"id":187},"_6-using-git-archive","6. Using Git Archive",[29,190,191],{},[32,192,193],{},"Git has an archive command that can be used to create a tarball of the repository, but it does not support partial checkouts or downloading specific folders directly. However, you can use it in a way that helps you achieve similar results by scripting",[63,195,197],{"className":65,"code":196,"language":67,"meta":68,"style":68},"git archive --remote=https:\u002F\u002Fgithub.com\u002Fowner\u002Frepo.git HEAD:path\u002Fto\u002Ffolder | tar -xvf -\n",[70,198,199],{"__ignoreMap":68},[73,200,201,204,207,210,213,215,218,221],{"class":75,"line":76},[73,202,203],{"class":79},"git",[73,205,206],{"class":83}," archive",[73,208,209],{"class":114}," --remote=https:\u002F\u002Fgithub.com\u002Fowner\u002Frepo.git",[73,211,212],{"class":83}," HEAD:path\u002Fto\u002Ffolder",[73,214,122],{"class":121},[73,216,217],{"class":79}," tar",[73,219,220],{"class":114}," -xvf",[73,222,223],{"class":83}," -\n",[29,225,226],{},[32,227,92],{},[11,229,231],{"id":230},"conclusion","🤝 Conclusion",[16,233,234],{},"Each method has its own advantages and limitations, so you can choose the one that best fits your needs.",[236,237,238],"style",{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}",{"title":68,"searchDepth":240,"depth":240,"links":241},2,[242,243,244],{"id":13,"depth":240,"text":14},{"id":21,"depth":240,"text":22},{"id":230,"depth":240,"text":231},"Detect specific folder without cloning the entire repository from GitHub",3,"md",{"src":249,"alt":250},"https:\u002F\u002Fraw.githubusercontent.com\u002Ffullstack-core\u002Fblog\u002Frefs\u002Fheads\u002Fmain\u002Fblog\u002Fcover\u002Fdownload_specific_folder.webp","GitHub_downloaded_specific_folder_img",{},"\u002Fposts\u002Fgit\u002Fdownload-specific-folder","2025-02-27",{"title":5,"description":245},{"loc":252,"lastmod":253},"posts\u002Fgit\u002Fdownload-specific-folder",[203,258],"github",false,"Np8JlhJTFUV4ypmSVzli38wUi1rAsBs5SmIOGeXfh68",[262,378,386,525],{"title":263,"icon":264,"path":265,"stem":266,"children":267,"page":259},"Cheatsheets","fluent-color:paw-16","\u002Fcheatsheets","cheatsheets",[268,273,278,283,288,293,298,303,308,313,318,323,328,333,338,343,348,353,358,363,368,373],{"title":269,"path":270,"stem":271,"icon":272},"Bash","\u002Fcheatsheets\u002Fbash","cheatsheets\u002Fbash","material-icon-theme:powershell",{"title":274,"path":275,"stem":276,"icon":277},"CSS","\u002Fcheatsheets\u002Fcss","cheatsheets\u002Fcss","vscode-icons:file-type-css2",{"title":279,"path":280,"stem":281,"icon":282},"Docker","\u002Fcheatsheets\u002Fdocker","cheatsheets\u002Fdocker","vscode-icons:file-type-docker2",{"title":284,"path":285,"stem":286,"icon":287},"Git","\u002Fcheatsheets\u002Fgit","cheatsheets\u002Fgit","devicon:git",{"title":289,"path":290,"stem":291,"icon":292},"Golang","\u002Fcheatsheets\u002Fgo","cheatsheets\u002Fgo","material-icon-theme:go",{"title":294,"path":295,"stem":296,"icon":297},"HTML","\u002Fcheatsheets\u002Fhtml","cheatsheets\u002Fhtml","material-icon-theme:html",{"title":299,"path":300,"stem":301,"icon":302},"JavaScript","\u002Fcheatsheets\u002Fjavascript","cheatsheets\u002Fjavascript","material-icon-theme:javascript",{"title":304,"path":305,"stem":306,"icon":307},"Latex","\u002Fcheatsheets\u002Flatex","cheatsheets\u002Flatex","material-icon-theme:latexmk",{"title":309,"path":310,"stem":311,"icon":312},"Linux","\u002Fcheatsheets\u002Flinux","cheatsheets\u002Flinux","devicon:linux",{"title":314,"path":315,"stem":316,"icon":317},"Markdown","\u002Fcheatsheets\u002Fmarkdown","cheatsheets\u002Fmarkdown","material-icon-theme:markdown",{"title":319,"path":320,"stem":321,"icon":322},"Mongo","\u002Fcheatsheets\u002Fmongo","cheatsheets\u002Fmongo","devicon:mongodb",{"title":324,"path":325,"stem":326,"icon":327},"Nest","\u002Fcheatsheets\u002Fnest","cheatsheets\u002Fnest","material-icon-theme:nest",{"title":329,"path":330,"stem":331,"icon":332},"Next","\u002Fcheatsheets\u002Fnext","cheatsheets\u002Fnext","logos:nextjs-icon",{"title":334,"path":335,"stem":336,"icon":337},"Node","\u002Fcheatsheets\u002Fnode","cheatsheets\u002Fnode","material-icon-theme:nodejs",{"title":339,"path":340,"stem":341,"icon":342},"Nuxt","\u002Fcheatsheets\u002Fnuxt","cheatsheets\u002Fnuxt","material-icon-theme:nuxt",{"title":344,"path":345,"stem":346,"icon":347},"React","\u002Fcheatsheets\u002Freact","cheatsheets\u002Freact","material-icon-theme:react",{"title":349,"path":350,"stem":351,"icon":352},"Redis","\u002Fcheatsheets\u002Fredis","cheatsheets\u002Fredis","vscode-icons:folder-type-redis-opened",{"title":354,"path":355,"stem":356,"icon":357},"SQL","\u002Fcheatsheets\u002Fsql","cheatsheets\u002Fsql","material-icon-theme:database",{"title":359,"path":360,"stem":361,"icon":362},"Typescript","\u002Fcheatsheets\u002Ftypescript","cheatsheets\u002Ftypescript","material-icon-theme:typescript",{"title":364,"path":365,"stem":366,"icon":367},"Vercel","\u002Fcheatsheets\u002Fvercel","cheatsheets\u002Fvercel","vscode-icons:file-type-light-vercel",{"title":369,"path":370,"stem":371,"icon":372},"Vue","\u002Fcheatsheets\u002Fvue","cheatsheets\u002Fvue","material-icon-theme:vue",{"title":374,"path":375,"stem":376,"icon":377},"Windows","\u002Fcheatsheets\u002Fwindow","cheatsheets\u002Fwindow","material-icon-theme:folder-windows",{"title":379,"icon":264,"path":380,"stem":381,"children":382,"page":259},"Interviews","\u002Finterviews","interviews",[383],{"title":294,"path":384,"stem":385,"icon":297},"\u002Finterviews\u002Fhtml","interviews\u002Fhtml",{"title":387,"icon":388,"path":389,"stem":390,"children":391,"page":259},"Posts","fluent-color:data-bar-vertical-ascending-24","\u002Fposts","posts",[392,401,417,440,448,461,470,479,489,515],{"title":393,"icon":357,"redirect":394,"path":395,"stem":396,"children":397,"page":259},"Database","\u002Fposts\u002Fdatabase\u002Freplication-strategy","\u002Fposts\u002Fdatabase","posts\u002Fdatabase",[398],{"title":399,"path":394,"stem":400,"icon":6},"Database Replication strategy in large systems","posts\u002Fdatabase\u002Freplication-strategy",{"title":279,"icon":282,"redirect":402,"path":403,"stem":404,"children":405,"page":259},"\u002Fposts\u002Fdocker\u002Fdocker-commands","\u002Fposts\u002Fdocker","posts\u002Fdocker",[406,409,413],{"title":407,"path":402,"stem":408,"icon":6},"Docker commands essentials","posts\u002Fdocker\u002Fdocker-commands",{"title":410,"path":411,"stem":412,"icon":6},"Some useful Dockerfile templates","\u002Fposts\u002Fdocker\u002Fdockerfile-templates","posts\u002Fdocker\u002Fdockerfile-templates",{"title":414,"path":415,"stem":416,"icon":6},"Setup Docker environment on Windows","\u002Fposts\u002Fdocker\u002Fsetup-docker-on-window","posts\u002Fdocker\u002Fsetup-docker-on-window",{"title":418,"icon":419,"redirect":420,"path":421,"stem":422,"children":423,"page":259},"Git & GitHub","material-icon-theme:git","\u002Fposts\u002Fgit\u002Fbrightly-decorate-graph","\u002Fposts\u002Fgit","posts\u002Fgit",[424,427,428,432,436],{"title":425,"path":420,"stem":426,"icon":6},"Brightly decorate your GitHub Graph","posts\u002Fgit\u002Fbrightly-decorate-graph",{"title":5,"path":252,"stem":256,"icon":6},{"title":429,"path":430,"stem":431,"icon":6},"Syncing Git Tags across to other repositories","\u002Fposts\u002Fgit\u002Fsyncing-tags-across-repositories","posts\u002Fgit\u002Fsyncing-tags-across-repositories",{"title":433,"path":434,"stem":435,"icon":6},"Unlocking GitHub Achievement badges","\u002Fposts\u002Fgit\u002Funlocking-achievement-badges","posts\u002Fgit\u002Funlocking-achievement-badges",{"title":437,"path":438,"stem":439,"icon":6},"Essential Git commands every developer should master","\u002Fposts\u002Fgit\u002Fuseful-commands-like-pro","posts\u002Fgit\u002Fuseful-commands-like-pro",{"title":289,"icon":292,"redirect":441,"path":442,"stem":443,"children":444,"page":259},"\u002Fposts\u002Fgolang\u002Foptimizing-performance-with-pgo","\u002Fposts\u002Fgolang","posts\u002Fgolang",[445],{"title":446,"path":441,"stem":447,"icon":6},"Optimizing Performance in Go Applications with PGO","posts\u002Fgolang\u002Foptimizing-performance-with-pgo",{"title":299,"icon":449,"redirect":450,"path":451,"stem":452,"children":453,"page":259},"vscode-icons:file-type-js","\u002Fposts\u002Fjavascript\u002F9-lines-of-tips","\u002Fposts\u002Fjavascript","posts\u002Fjavascript",[454,457],{"title":455,"path":450,"stem":456,"icon":6},"9 lines of JavaScript replace 50 lines of code","posts\u002Fjavascript\u002F9-lines-of-tips",{"title":458,"path":459,"stem":460,"icon":6},"Javascript Promises - Specific functions and use cases","\u002Fposts\u002Fjavascript\u002Fpromises-cheatsheet","posts\u002Fjavascript\u002Fpromises-cheatsheet",{"title":334,"icon":462,"redirect":463,"path":464,"stem":465,"children":466,"page":259},"material-icon-theme:nodejs-alt","\u002Fposts\u002Fnodejs\u002Fevent-loop","\u002Fposts\u002Fnodejs","posts\u002Fnodejs",[467],{"title":468,"path":463,"stem":469,"icon":6},"Secret about Event Loop flow in Nodejs","posts\u002Fnodejs\u002Fevent-loop",{"title":339,"icon":471,"redirect":472,"path":473,"stem":474,"children":475,"page":259},"vscode-icons:file-type-nuxt","\u002Fposts\u002Fnuxt\u002Fenable-pwa-in-nuxt","\u002Fposts\u002Fnuxt","posts\u002Fnuxt",[476],{"title":477,"path":472,"stem":478,"icon":6},"Enable PWA and Service Worker in Nuxt","posts\u002Fnuxt\u002Fenable-pwa-in-nuxt",{"title":480,"icon":481,"redirect":482,"path":483,"stem":484,"children":485,"page":259},"Performance","emojione:rocket","\u002Fposts\u002Fperformance\u002Fbackground-image-injection-problem","\u002Fposts\u002Fperformance","posts\u002Fperformance",[486],{"title":487,"path":482,"stem":488,"icon":6},"Background-Image injection problem in UX","posts\u002Fperformance\u002Fbackground-image-injection-problem",{"title":490,"icon":491,"redirect":492,"path":493,"stem":494,"children":495,"page":259},"Tutorial","fluent-color:book-open-lightbulb-24","\u002Fposts\u002Ftutorial\u002Fclassification-and-functionality-of-the-servers","\u002Fposts\u002Ftutorial","posts\u002Ftutorial",[496,499,503,507,511],{"title":497,"path":492,"stem":498,"icon":6},"Classification and functionality of the servers","posts\u002Ftutorial\u002Fclassification-and-functionality-of-the-servers",{"title":500,"path":501,"stem":502,"icon":6},"What is the difference between localhost and 127.0.0.1?","\u002Fposts\u002Ftutorial\u002Fdifferent-between-localhost-and-127-0-0-1","posts\u002Ftutorial\u002Fdifferent-between-localhost-and-127-0-0-1",{"title":504,"path":505,"stem":506,"icon":6},"8 essential network protocols every programmer should know","\u002Fposts\u002Ftutorial\u002Fessential-network-protocols","posts\u002Ftutorial\u002Fessential-network-protocols",{"title":508,"path":509,"stem":510,"icon":6},"Pre rels in header link tag - SEO technique enhancement","\u002Fposts\u002Ftutorial\u002Fpre-rels-in-header-link-tag","posts\u002Ftutorial\u002Fpre-rels-in-header-link-tag",{"title":512,"path":513,"stem":514,"icon":6},"Better code with SOLID principles","\u002Fposts\u002Ftutorial\u002Fwhat-is-solid","posts\u002Ftutorial\u002Fwhat-is-solid",{"title":516,"icon":517,"redirect":518,"path":519,"stem":520,"children":521,"page":259},"UI\u002FUX","devicon:figma","\u002Fposts\u002Fuiux\u002Fcommon-button-mistake","\u002Fposts\u002Fuiux","posts\u002Fuiux",[522],{"title":523,"path":518,"stem":524,"icon":6},"Common Button Mistake in UI\u002FUX","posts\u002Fuiux\u002Fcommon-button-mistake",{"title":526,"icon":527,"path":528,"stem":529,"children":530,"page":259},"Templates","fluent-color:data-pie-24","\u002Ftemplates","templates",[531,534,537,540,543],{"title":289,"path":532,"stem":533,"icon":292},"\u002Ftemplates\u002Fgo","templates\u002Fgo",{"title":329,"path":535,"stem":536,"icon":332},"\u002Ftemplates\u002Fnext","templates\u002Fnext",{"title":339,"path":538,"stem":539,"icon":342},"\u002Ftemplates\u002Fnuxt","templates\u002Fnuxt",{"title":344,"path":541,"stem":542,"icon":347},"\u002Ftemplates\u002Freact","templates\u002Freact",{"title":369,"path":544,"stem":545,"icon":372},"\u002Ftemplates\u002Fvue","templates\u002Fvue",[547,548],{"title":425,"path":420,"stem":426,"children":-1},{"title":429,"path":430,"stem":431,"children":-1},[550,558,565],{"_path":438,"title":437,"description":551,"image":552,"category":203,"tags":555,"duration":556,"publishedAt":557},"Master Git like a pro with these powerful commands for commit management, branch operations, and workflow optimization",{"src":553,"alt":554},"https:\u002F\u002Fwww.matillion.com\u002Fuploads\u002Fcards\u002F_1200x630_crop_center-center_82_none\u002FBlog-GIT-Part3.png","Essential_Git_commands_image",[203,258],5,"2025-08-05",{"_path":430,"title":429,"description":559,"image":560,"category":203,"tags":563,"duration":76,"publishedAt":564},"Learn how to synchronize Git tags between multiple repositories effortlessly.",{"src":561,"alt":562},"https:\u002F\u002Fmedia.licdn.com\u002Fdms\u002Fimage\u002Fv2\u002FD4E12AQGPhWyP7Rc1sw\u002Farticle-cover_image-shrink_720_1280\u002Farticle-cover_image-shrink_720_1280\u002F0\u002F1729234511193?e=2147483647&v=beta&t=nRMwzDEvPjm0UJ_TW9cP9gQF4_kfB0HbJh3a5lrVA3M","Syncing_Git_Tags_image",[203,258],"2025-07-11",{"_path":434,"title":433,"description":566,"image":567,"category":203,"tags":570,"duration":571,"publishedAt":572},"A comprehensive guide to get achievement badges on your GitHub profile!",{"src":568,"alt":569},"https:\u002F\u002Frepository-images.githubusercontent.com\u002F634841108\u002F401fc2d0-ee6e-4a75-aabf-e63330221642","GitHub_Achievements_image",[203,258],6,"2025-07-07"]