Skip to content

Instantly share code, notes, and snippets.

View vincentremond's full-sized avatar

Vincent Rémond vincentremond

View GitHub Profile
@vincentremond
vincentremond / git-clone-all-repos.ps1
Created April 1, 2024 15:11
git clone all repos (powershell)
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 `
}