Skip to main content
Stack Overflow
  1. About
  2. For Teams

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

Required fields*

Download a single folder or directory from a GitHub repository

How can I download only a specific folder or directory from a remote Git repository hosted on GitHub?

Say the example GitHub repository lives here:

[email protected]:foobar/Test.git

Its directory structure:

Test/
├── foo/
│ ├── a.py
│ └── b.py
└── bar/
 ├── c.py
 └── d.py

I want to download only the foo folder and not clone the whole Test project.

Answer*

Draft saved
Draft discarded
Cancel
3
  • 1
    I have to download many files from a specific folder and got this error in the middle of the download: svn: E175002: REPORT of '/bgmartins/scripts-parlamento/!svn/vcc/default': 200 OK (github.com) Do you how can I resume the download? Commented Jun 7, 2017 at 21:56
  • Worked for me. That's amazing. Commented Mar 21, 2019 at 19:38
  • Amazing! Worked great! Commented Mar 25, 2021 at 11:57

AltStyle によって変換されたページ (->オリジナル) /