Uses git sparse checkout features to git clone only a given directory path within a repo.
Provide a GitHub tree-URL (a URL to a specific directory on a branch) as the only argument. Currently this only supports sparse checkout from GitHub.
Example: git clonedir https://github.com/GoogleChrome/chrome-extensions-samples/tree/mv3-migration-snippet/mv2-archive/api/messaging/timer
If you have custom executables named as git-*
in $PATH, git
will automatically detect and offer these commands as subcommands. Therefore if you place git-clonedir
in your $PATH (e.g. /usr/local/bin/) then you can also run it as git clonedir
.