2

We currently use gitlab as our main source control of our code in the company. The management decided to move to Bitbucket. We were tasked to make a plan on how the migration will work. We need to migrate all the source code (branches, tags) from gitlab to bitbucket. We also can't use bitbucket import feature as our source code servers are behind a firewall.

I found many posts about this topic already.

link1

link2

link3

I'm not sure what are the differences between those approaches. In general, I will be creating REPO-NAME folder for every project that we have, clone it locally and remove the folder when the migration of that project will be finished.

  1. git clone --bare GITLAB-URL

    cd REPO-NAME

    git remote add bitbucket BITBUCKET-URL

    git push --all bitbucket

    git push --tags bitbucket

    cd .. rm -rf REPO-NAME

vs

  1. git clone --bare GITLAB-URL

    cd REPO-NAME

    git remote add bitbucket BITBUCKET-URL

    git push --mirror bitbucket

    cd .. rm -rf REPO-NAME

vs

  1. git clone --mirror GITLAB-URL

    cd REPO-NAME

    git remote add bitbucket BITBUCKET-URL

    git push --mirror bitbucket

    cd .. rm -rf REPO-NAME

vs

  1. git clone --mirror GITLAB-URL

    cd REPO-NAME

    git remote add bitbucket BITBUCKET-URL

    git push bitbucket

    cd .. rm -rf REPO-NAME

DemoDemo
  • 372
  • 1
  • 12

0 Answers0