Skip to content

Instantly share code, notes, and snippets.

@Baneeishaque
Forked from KarsonAlford/Clone All Repos
Last active June 2, 2024 16:47
Show Gist options
  • Save Baneeishaque/e37478e64a9984eb729c285c7a3144db to your computer and use it in GitHub Desktop.
Save Baneeishaque/e37478e64a9984eb729c285c7a3144db to your computer and use it in GitHub Desktop.
gh-clone-all.ps1
# Install Github CLI
# winget install -e --id GitHub.cli
# Log into Github
# gh auth login
$clonePath = "c:/all"
$orgName = 'Your Org Name Goes Here!!!'
New-Item -ItemType Directory -Force -Path $clonePath
Push-Location $clonePath
# Your non organization repos
#gh repo list | ForEach-Object { gh repo clone $_.Split("`t")[0] }
# Organization repos (first 100)
gh repo list $orgName -L 100 | ForEach-Object { gh repo clone $_.Split("`t")[0] }
Pop-Location
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment