Created
April 5, 2019 10:07
-
-
Save robsonalves/90e24d8b09a822072d5bde1b159811b6 to your computer and use it in GitHub Desktop.
Script to migrate Repostories Git on DevOpsAzure - Including All Branches
This file contains 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 | |
clear | |
REPOS=(teste teste1 teste2) | |
git=https://user:password@{organizationName}.visualstudio.com/{TeamProject}/_git/ | |
newRepo=https://user:password@{organizationName}.visualstudio.com/{TeamProject}/_git/ | |
for i in ${REPOS[@]} | |
do | |
echo $git$i | |
cd /v/ | |
git clone --bare $git$i | |
cd $i.git | |
echo $newRepo$i | |
git push --mirror $newRepo$i | |
cd /v/ | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment