-
-
Save Baneeishaque/e37478e64a9984eb729c285c7a3144db 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