Skip to content

Instantly share code, notes, and snippets.

@aslamanver
Created July 5, 2023 06:07
Show Gist options
  • Save aslamanver/c6a69ea5a9e61a43c45c2d2a6a0ddd5d to your computer and use it in GitHub Desktop.
Save aslamanver/c6a69ea5a9e61a43c45c2d2a6a0ddd5d to your computer and use it in GitHub Desktop.
Migrate GIT Repositories Script
gh repo list orgname --limit 1000 | while read -r repo _; do
echo "git clone --mirror git@github.com:$repo.git"
git clone --mirror git@github.com:$repo.git
# cd $repo.git
# git remote set-url origin git@github.com:orgname/$REPO.git
# git push --mirror
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment