- create repo on github (from web interface)
- run script:
./bitbucket_to_github.sh <user_name> <repository_name>
./bitbucket_to_github.sh wcoder MySuperProject
#!/bin/bash | |
# clone from Bitbucket | |
git clone --mirror https://bitbucket.org/$1/$2.git | |
cd $2.git | |
# push to GitHub | |
git remote set-url --push origin [email protected]:$1/$2.git | |
git push --mirror | |
# clean up | |
rm -rf $2.git |