How to import gitlab repository to bitbucket Repository

前端 未结 3 974
忘掉有多难
忘掉有多难 2021-02-01 08:03

I have a gitlab Repository and I want it to update it on the bitbucket account.

Please provide me steps to follow, so that it can be helpful to me to mi

3条回答
  •  南笙
    南笙 (楼主)
    2021-02-01 08:32

    If you want to do it straight from the repositories themselves there is a way also.

    1. Rsync the /home/git/repositories directory (copying them is less risky than working on source files themselves) to your home dir

      sudo rsync -avzh /home/git/repositories /home//repos/

    2. Set the permissions on your repos dir to yourself

      sudo chown -R : /home//repos

    3. Create the empty repo on bitbucket.

    4. Mirror them locally to create a working copy that contains all branches and tags with you.

      git clone --mirror git@gitlab.mydomain.com/source-repo.git

    5. Then you would want to simply push the mirror.

      cd source-repo.git git push --mirror git@bitbucket.com/new-location.git

提交回复
热议问题