Created
April 1, 2024 15:11
-
-
Save vincentremond/be6bf479c2853df72a3c46ba8a0b0161 to your computer and use it in GitHub Desktop.
git clone all repos (powershell)
This file contains 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
gh repo list vincentremond --limit 9000 --json name,owner | ConvertFrom-Json | ForEach-Object { ` | |
$TargetDirectory = Join-Path -Path $env:USERPROFILE -ChildPath "repos\GitHub\$($_.owner.login)\$($_.name)" ; ` | |
Write-Host "Cloning $($_.owner.login)/$($_.name) to $TargetDirectory" -ForegroundColor Green ; ` | |
New-Item -Path $TargetDirectory -ItemType Directory -Force | Out-Null ; ` | |
git clone "https://github.com/$($_.owner.login)/$($_.name).git" $TargetDirectory ` | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment