How to import gitlab repository to bitbucket Repository

前端 未结 3 1017
忘掉有多难
忘掉有多难 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:36

    1) Create the repository in Bitbucket using the UI

    2) Clone the Gitlab repository using the "--bare" option

    git clone --bare GITLAB-URL
    

    3) Add the Bitbucket remote

    cd REPO-NAME
    git remote add bitbucket BITBUCKET-URL
    

    4) Push all commits, branches and tags to Bitbucket

    git push --all bitbucket
    git push --tags bitbucket
    

    5) Remove the temp repository

    cd ..
    rm -rf REPO-NAME
    

提交回复
热议问题