Last active
June 19, 2023 11:08
-
-
Save frogggias/7503f6a5378f24cf22548fadbe7d79fa to your computer and use it in GitHub Desktop.
Mirror git repository (BB to GitHub migration)
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
BB_REPO_SSH_URL= | |
GITHUB_REPO_SSH_URL= | |
LOCAL_FOLDER=ghm | |
# Cleanup | |
if [ -d ${LOCAL_FOLDER} ]; then | |
rm -rf ${LOCAL_FOLDER} | |
fi | |
git clone --mirror ${BITBUCKET_REPO_SSH_URL} ${LOCAL_FOLDER} | |
# git -C ${LOCAL_FOLDER} lfs fetch --all # Uncomment for LFS support | |
git -C ${LOCAL_FOLDER} push --mirror ${GITHUB_REPO_SSH_URL} | |
# git -C ${LOCAL_FOLDER} lfs push ${GITHUB_REPO_SSH_URL} --all # Uncomment for LFS support |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment