Created
August 21, 2019 08:25
-
-
Save joshghent/d64f73267d43983e62c4d34d646e7969 to your computer and use it in GitHub Desktop.
Mirror repos from gitlab to github
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
#!/bin/bash | |
repos=(repository1 repository2) | |
githubName="joshghent" | |
for repo in "${!repos[@]}" | |
do | |
reponame=${repos[repo]} | |
git clone [email protected]:${githubName}/${reponame}.git | |
cd ${reponame} | |
git remote add github [email protected]:${githubName}/${reponame}.git | |
git push --mirror github | |
cd .. | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment