Last active
December 5, 2024 18:26
-
-
Save KarsonAlford/f26f1bcca772d9ac6a76d8594155f923 to your computer and use it in GitHub Desktop.
gh-clone-all.ps1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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
Works like a charm! (a little hard to find, but ultimately from your comment in this answer https://stackoverflow.com/questions/19576742/how-to-clone-all-repos-at-once-from-github)