Skip to content

Instantly share code, notes, and snippets.

@mdsami
Created March 21, 2025 11:43
Show Gist options
  • Save mdsami/0870d360703c3fb91cb5b0303e3699f3 to your computer and use it in GitHub Desktop.
Save mdsami/0870d360703c3fb91cb5b0303e3699f3 to your computer and use it in GitHub Desktop.
git clone all repos from a Org or from a profile
gh repo list myorg --limit 4000 | while read -r repo _; do
repo_name=$(basename "$repo")
echo "Cloning $repo_name as mirror..."
git clone --mirror "https://github.com/$repo.git"
#gh repo clone "$repo" "$repo"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment