{"id":23881801,"url":"https://github.com/zikani03/git-down","last_synced_at":"2025-04-09T20:53:01.371Z","repository":{"id":16988652,"uuid":"80789545","full_name":"zikani03/git-down","owner":"zikani03","description":"Download directories from Git repos like a boss!","archived":false,"fork":false,"pushed_at":"2022-04-21T23:10:04.000Z","size":36,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-09T20:52:55.607Z","etag":null,"topics":["git"],"latest_commit_sha":null,"homepage":"https://labs.zikani.me/git-down/","language":"Rust","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/zikani03.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":"2017-02-03T02:18:08.000Z","updated_at":"2024-02-20T09:26:19.000Z","dependencies_parsed_at":"2022-08-07T08:15:43.371Z","dependency_job_id":null,"html_url":"https://github.com/zikani03/git-down","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zikani03%2Fgit-down","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zikani03%2Fgit-down/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zikani03%2Fgit-down/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zikani03%2Fgit-down/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zikani03","download_url":"https://codeload.github.com/zikani03/git-down/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248111976,"owners_count":21049577,"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":["git"],"created_at":"2025-01-04T01:59:00.564Z","updated_at":"2025-04-09T20:53:01.344Z","avatar_url":"https://github.com/zikani03.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"Git Down\n========\n\n`git-down` lets you download one or multiple directories from a Git repository without the\nhassle of cloning or downloading the whole repository, with one simple command.\n\n## Usage\n\nIt's really easy to use.\n\n```sh\n$ git-down -d \u003cDESTINATION_DIRECTORY\u003e \u003cREPO_URL.git:branch\u003e FILES\n```\n\nThe `-d \u003cDESTINATION_DIRECTORY\u003e` option above is optional. If not specified the files\nwill be downloaded into a directory under the name of the target repository.\n\n\u003e We're using the bootstrap repo as an example for how to use the command but it works with \nany repository.\n\nFor example, running the following command will create a `bootstrap-dist` directory in the current \nworking directory containing bootstrap's `dist` directory.\n\n```sh\n$ git-down -d bootstrap-dist https://github.com/twbs/bootstrap.git:master dist\n```\n\nIf bootstrap-dist above is not specified, a directory named bootstrap will be created\ninstead.\n\n### Download multiple directories\n\nYou can use git-down to download multiple directories from the same repository.\n\nFor example if you wanted to download both the dist and src directories from the Bootstrap repo you would \nuse the following command.\n\n```sh\n$ git-down https://github.com/twbs/bootstrap.git:master dist src \n```\n\n### Shortcuts\n\nShortcuts are intended to reduce keystrokes by allowing you to download from popular Git hosting\nservices without typing out the full URL of the repository.\n\nWhen using shortcuts the parts of the _source_ are separated using colons (:).\n\nThe following are working examples you can use for downloading a directory from \nsupported services:\n\n**GitHub**\n\nThe following example command will download the dist directory from bootstrap repo\ninto boostrap-latest from the GitHub repository.\n\n```sh\n$ git-down -d bootstrap-latest gh:tbws/bootstrap:master dist\n```\n\nGet only the css directory \n\n```sh\n$ git-down -d bootstrap-css gh:tbws/bootstrap:master dist/css\n```\n\nGet the css and img directories\n\n```sh\n$ git-down -d boostrap-css-img gh:tbws/bootstrap:master dist/css dist/img\n```\n\n**BitBucket**\n\n```sh\n$ git-down -d sqlalchemy-examples bb:zzzeek/sqlalchemy:master examples \n```\n\n**GitLab**\n\n```sh\n$ git-down -d gitlab-scripts gl:gitlab-org/gitlab-ce:master scripts \n```\n\n**SourceForge**\n\n```sh\n$ git-down -d nagioscore-sample-config sf:nagios/nagios-core:master sample-config \n```\n\n## Why do I need this in my life?\n\nIt will save you time. Currently all of the ways to get just one directory from a repository \nrequire either _too much_ clicking or typing!\n\nIf you want to download just one (or multiple) directory from a Git repository -\nlike a `dist` directory of a project like bootstrap - you have several ways of \ndoing so, including:\n \n**Download the archive and extract**\n\nThe easiest and most straight-forward approach is to download the archive\nof the repo, extract the files and get the files/directory you want.\nThis works best if you can get the archive via a web interface via a *Download*\nbutton/link - which can be annoying to find in some products (BitBucket!).\n\n**Shallow clone and mv**\n\nAnother way is to do a shallow clone and get the directories you want using a move command.\nIt's just too many commands and typing!\n\nFor example, getting the dist directory from bootstrap you would do something like:\n\n```sh\n$ git clone --depth 1 https://github.com/twbs/boostrap.git\n$ cd bootstrap\n$ mv ./dist ~/stuff/boostrap-latest \n```\n\nC'mon, you don't have the time to be doing all that. \n\n## Installation\n\nNo pre-packaged binaries - you have to build it yourself, sorry. :/\n\nYou will have to install Rust. I highly recommend using [rustup](https://www.rustup.rs)\n\n```sh\n$ git clone https://github.com/zikani03/git-down.git\n$ cd git-down\n$ cargo build --release\n$ mv target/release/git-down ~/bin/git-down\n```\n\nAssuming your `~/bin` is on your PATH you can now use it from the shell as `git-down`\n\n## Planned Features\n\n### From a different commit, tag, revision\n\nThis would be nice, me thinks :)\n\n```sh\n$ git-down -f v3.3.2 gh:twbs/bootstrap:dist bootstrap-3.3.2\n```\n\nNow, git down to business!\n\n# LICENCE\n\nMIT\n\n---\nCopyright (c) 2017, Zikani Nyirenda Mwase\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzikani03%2Fgit-down","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzikani03%2Fgit-down","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzikani03%2Fgit-down/lists"}