Skip to content

Instantly share code, notes, and snippets.

@EndBug
Last active February 12, 2024 23:36
Show Gist options
  • Save EndBug/11df3b73c3f6f37f484baecca33883e6 to your computer and use it in GitHub Desktop.
Save EndBug/11df3b73c3f6f37f484baecca33883e6 to your computer and use it in GitHub Desktop.
GH CLI alias to clone repos in an Owner/Repo directory structure
gh alias set --shell c 'gh repo view "$1" --json "owner,name" --jq "[.owner.login, .name] | join(\"/\")" | { read dir; gh repo clone "$1" "$dir"; }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment