I am moving my source code from Bitbucket
cloud to Gitlab
. I imported the project from Bitbucket
into Gitlab
using Gitlab's Import
feature. My bitbucket repo also has git-lfs objects. How do I import them?
Cheers!
I am moving my source code from Bitbucket
cloud to Gitlab
. I imported the project from Bitbucket
into Gitlab
using Gitlab's Import
feature. My bitbucket repo also has git-lfs objects. How do I import them?
Cheers!
I recently did this with a Github-to-Gitlab-EE migration. Assuming that Bitbucket is using git-lfs then it should work the same way. Here's what I did:
ORG=myorg
REPONAME=myrepo
OLD_REPO=github.com
NEW_REPO=gitlab.mydomain.com
echo "Old repo=git@${OLD_REPO}:${ORG}/${REPONAME}"
echo "New repo=git@${NEW_REPO}:${ORG}/${REPONAME}"
git clone --bare git@${OLD_REPO}:${ORG}/${REPONAME}.git
cd ${REPONAME}.git
git lfs fetch --all
git config lfs.https://${NEW_REPO}/${ORG}/${REPONAME}.git/info/lfs.locksverify true
git lfs push --all git@${NEW_REPO}:${ORG}/${REPONAME}.git
git push --all git@${NEW_REPO}:${ORG}/${REPONAME}.git