[GitHub CLI] extension for Github repo organization.
By default clones repositories to $HOME/src/github.com/<org>/<repo>
.
Make sure you have version 2.0 or [newer] of the [GitHub CLI] installed.
gh extension install hbowron/gh-clone
The gh extension list
command shows if updates are available for extensions. To upgrade, you can use the gh extension upgrade
command:
gh extension upgrade hbowron/gh-clone
# Or upgrade all extensions:
gh extension upgrade --all
# if you want to change the default clone directory
export GH_CLONE_DEFAULT_DIR="$HOME/src/github.com"
# if you want to set a default organization
export GH_CLONE_DEFAULT_ORG="kubernetes"
# `gh clone cloud-provider-aws` will clone github.com/kubernetes/cloud-provider-aws
gh clone <org>/<repo>