Created
October 17, 2019 08:21
-
-
Save willis7/a721d924ef25674a9b38245f45f1d32b to your computer and use it in GitHub Desktop.
Mass migrating repositories to GitLab
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
for repo in $(cat repos.txt); | |
do git clone $repo --mirror; | |
slug=$(echo $repo | sed -n 's/.*\/\(.*\).git/\1/p'); | |
cd $slug.git; | |
git remote add your_remote [email protected]:your_organization/your_project/$slug.git; | |
git push your_remote --mirror; | |
cd -; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment