Last active
June 27, 2019 08:18
-
-
Save manimike00/157337ce4f91d2f6239cbb97e67ee1c4 to your computer and use it in GitHub Desktop.
Script for MIgrating Repo From Bitbucket 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
### Step 1: Set the RSA Public Key in Both SCM (BitBucket and Github) | |
### Step 2: Ensure StrictHostKeyChecking no in /etc/ssh/ssh_config | |
### Step 3: Pass repo names as Parameter while executing the Script | |
### For Example: bash test.sh reponame | |
### Step 4: Make Sure Ensure You have same repo name in both SCM | |
for i in "$@" | |
do | |
git clone [email protected]:username/${i}.git | |
cd bbgg | |
git remote set-url --push origin [email protected]:username/${i}.git | |
git push --mirror | |
rm -rf ../${i} | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment