mfbx9da4 / Git Sub Dir
Downloads sub-directory of a github repository.
Stars: ✭ 56
Programming Languages
python
139335 projects - #7 most used programming language
Downloads git sub dir
Usage
python get_git_sub_dir.py user/repo <options>
python get_git_sub_dir.py user/private_repo --private <options>
Options Flags:
-
--private
: the repo is private (default isFalse
, username and password will be requested) -
-r
: recursive download (default isTrue
) -
-p
: filepath -
-b
: branch
Example
Let's download the docs from twitter bootstrap https://github.com/twbs/bootstrap/tree/master/docs
python get_git_sub_dir.py twbs/bootstrap -p docs
If we don't want it to be recursive
python get_git_sub_dir.py twbs/bootstrap -p docs -r False
If we want a specific file
python get_git_sub_dir.py twbs/bootstrap -p docs/examples/blog/index.html
If we want to download from a specific branch (say fix-15534
)
python get_git_sub_dir.py twbs/bootstrap -p docs/examples/blog/index.html -b fix-15534
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].