No project description provided
Project description
git-remote-get
Download single files or directories from a git remote repository without cloning its entire contents.
Installation
pip install git-remote-get
Usage
Usage: git-remote-get [OPTIONS] PATH [DESTINATION]
Get a file from a remote git repository
Arguments:
PATH: The path on the remote repository to get the file from
DESTINATION: The path to save the file to. Defaults to the same as the path.
Options:
--repo TEXT The repo to get the file from. You can also set the
GGET_REPO environment variable to set this option.
--from TEXT Alias for --repo
--owner TEXT The owner of the repo to get the file from. You can
also set the GGET_OWNER environment variable to set
this option. [required]
--provider [github] The remote repository provider to get the file from.
Defaults to github. Currently, only github is
supported. You can set the GGET_PROVIDER environment
variable to set this option.
--ref TEXT Branch or commit to get the file from. Defaults to
master. You can set the GGET_REF environment variable
to set this option.
--help Show this message and exit.
You can also use the gget
alias for git-remote-get
.
Examples
# This will download the README file from the octocat/Hello-World repository
# and save it to the current directory with same name
gget README --owner=octocat --repo=Hello-World
# This will download the README file
# and save it to docs/README.md
gget README --owner=octocat --repo=Hello-World docs/README.md
# This will download `examples/tutorial`
# of flask repository and save it to the current directory.
#
# If destination is not provided, the program
# will create a directory with the same name as the PATH.
#
# In other words, you will get `examples/tutorial` directory
# and its contents inside that directory.
gget examples/tutorial --owner=pallets --repo=flask --ref=main
# This will download the `examples/tutorial`
# of flask repository and save it to `tutorial` directory.
#
# In this case, the destination is provided.
# Contents under `examples/tutorial` will be saved to `tutorial-contents` directory.
gget examples/tutorial --owner=pallets --repo=flask --ref=main tutorial-contents
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
git_remote_get-0.1.0.tar.gz
(6.9 kB
view hashes)
Built Distribution
Close
Hashes for git_remote_get-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90bb0fdd3d4a6bc409487e6e1e880dc4ecdec2f896443a1bfe7ca940ef4924b4 |
|
MD5 | 0fbab166dccf1daf58214cea6e28363e |
|
BLAKE2b-256 | f6b9ba02bef71c896f55f56499b8deb3b095d5073b7274a269a25f0e7eb7e9bc |