{"id":26085965,"url":"https://github.com/guillemcastro/git-get","last_synced_at":"2026-04-28T12:32:35.600Z","repository":{"id":64307220,"uuid":"224271569","full_name":"GuillemCastro/git-get","owner":"GuillemCastro","description":"Download a single file or directory from a git repository","archived":false,"fork":false,"pushed_at":"2020-02-12T20:35:59.000Z","size":29,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-09T06:33:14.902Z","etag":null,"topics":["bitbucket","git","github","gitlab","go","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GuillemCastro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-26T19:38:20.000Z","updated_at":"2020-02-12T20:36:01.000Z","dependencies_parsed_at":"2023-01-15T11:00:35.866Z","dependency_job_id":null,"html_url":"https://github.com/GuillemCastro/git-get","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GuillemCastro%2Fgit-get","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GuillemCastro%2Fgit-get/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GuillemCastro%2Fgit-get/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GuillemCastro%2Fgit-get/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GuillemCastro","download_url":"https://codeload.github.com/GuillemCastro/git-get/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GuillemCastro%2Fgit-get/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259078524,"owners_count":22802140,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bitbucket","git","github","gitlab","go","golang"],"created_at":"2025-03-09T06:33:16.632Z","updated_at":"2025-10-26T22:02:00.359Z","avatar_url":"https://github.com/GuillemCastro.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# git-get\n\nDownload a single file or directory from a git repository. Inspired by `svn export`.\n\nCurrently, we depend on the fact that most version control hosts provide a way to access and download the raw files of a repository. On Github we can download a file by executing `wget https://raw.githubusercontent.com/user/project/branch/file`, on Bitbucket it's `wget https://bitbucket.org/user/project/raw/commit-hash/file` and on Gitlab `wget https://gitlab.com/user/project/raw/branch/file`. As you can see, there's no standard way to download a file, let alone a whole folder.\n\nRight now git-get makes an in-memory clone and copies the requested files. This is not viable for very large repos. The objective is to be able to download files without having to do a full clone.\n\n## Installing\n\nJust execute:\n\n```\ngo get github.com/GuillemCastro/git-get\n```\n\n## Usage\n\n```\nUsage:\n  git get [OPTIONS] URL Path\n\nApplication Options:\n  -b, --branch= Branch, tag or commit hash\n  -o, --output= Name of the output file or directory\n\nHelp Options:\n  -h, --help    Show this help message\n\nArguments:\n  URL:          URL to a Git repository\n  Path:         File or directory to download\n```\n\nFor example to download the `main.go` file from this repository, we would execute:\n\n`git get github.com/GuillemCastro/git-get main.go`\n\nThis will download the file onto the current folder. Note that it will override any local file.\n\nTo download a folder, the procedure is the same. If we want to download the `src` folder from this repository https://github.com/GuillemCastro/rt-data, we would execute:\n\n`git get github.com/GuillemCastro/rt-data src`\n\nThis will create a `src` folder inside the current folder.\n\n## Status\n\n- [x] Download a file or folder from the master/default branch\n- [x] Download from a branch, tag or a specific commit\n- [ ] Use git config\n- [ ] Don't require a complete clone\n\n## License\n\n```\nMIT License\n\nCopyright (c) 2019 Guillem Castro\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguillemcastro%2Fgit-get","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguillemcastro%2Fgit-get","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguillemcastro%2Fgit-get/lists"}