How to move git repository with all branches from bitbucket to github?

前端 未结 11 1780
孤城傲影
孤城傲影 2020-12-02 03:21

What is the best way to move a git repository with all branches and full history from bitbucket to github? Is there a script or a list of commands I have to use?

11条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-02 04:07

    http://www.blackdogfoundry.com/blog/moving-repository-from-bitbucket-to-github/

    This helped me move from one git provider to another. At the end of it, all the commits were in the destination git. Simple and straight forward.

    git remote rename origin bitbucket
    git remote add origin https://github.com/edwardaux/Pipelines.git
    git push origin master
    

    Once I was happy that the push had been successful to GitHub, I could delete the old remote by issuing:

    git remote rm bitbucket
    

提交回复
热议问题