-
-
Save ariessanchezsulit/2f7866c84a3345fbac62f3ee14f61699 to your computer and use it in GitHub Desktop.
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 -e | |
# PREREQ: add ssh keys to both git cloud host | |
OLD_ORG=mely0 | |
OLD_REPONAME=test001 | |
OLD_REPO=bitbucket.org | |
echo "Old repo=git@${OLD_REPO}:${OLD_ORG}/${OLD_REPONAME}" | |
NEW_ORG=melyo | |
NEW_REPONAME=test005 | |
NEW_REPO=gitlab.com | |
echo "New repo=git@${NEW_REPO}:${NEW_ORG}/${NEW_REPONAME}" | |
git clone --bare git@${OLD_REPO}:${OLD_ORG}/${OLD_REPONAME}.git | |
cd ${OLD_REPONAME}.git | |
git lfs fetch --all | |
git config lfs.https://${NEW_REPO}/${NEW_ORG}/${NEW_REPONAME}.git/info/lfs.locksverify true | |
git lfs push --all git@${NEW_REPO}:${NEW_ORG}/${NEW_REPONAME}.git | |
git push --all git@${NEW_REPO}:${NEW_ORG}/${NEW_REPONAME}.git |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment