-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from lsissoko/master
Options flags for branch and private repo credentials
- Loading branch information
Showing
2 changed files
with
66 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,29 @@ | ||
Downloads git sub dir | ||
|
||
##Usage | ||
|
||
|
||
python get_git_sub_dir.py path/to/sub/dir <RECURSIVE> | ||
|
||
<RECURSIVE> is a boolen `True` or `False`. Default is `True`. | ||
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 is `False`, username and password will be requested) | ||
- `-r`: recursive download (default is `True`) | ||
- `-p`: filepath | ||
- `-b`: branch | ||
|
||
##Example | ||
|
||
Lets download the docs from twitter bootstrap https://github.com/twbs/bootstrap/tree/master/docs | ||
Let's download the docs from twitter bootstrap https://github.com/twbs/bootstrap/tree/master/docs | ||
|
||
python get_git_sub_dir.py twbs/bootstrap/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/docs False | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters