How Do I Move a Git Repo from Beanstalk to Github?

前端 未结 2 545
日久生厌
日久生厌 2021-02-15 20:01

I have my code repo in Beanstalk. How do I move the code from Beanstalk to Github?

相关标签:
2条回答
  • 2021-02-15 20:26

    The recommended way to do this is to:

    git clone --bare url/for/beanstalk/repo.git .
    git push --mirror git@github.com:user/repo.git
    

    Also see here: https://help.github.com/articles/importing-an-external-git-repo

    0 讨论(0)
  • 2021-02-15 20:29

    From the GitHub Documentation

    # In this example, we use an external account named extuser and
    # a GitHub account named ghuser to transfer repo.git
    
    # Make a bare clone of the external repo to a local directory
    $ git clone --bare https://githost.org/extuser/repo.git
    
    # Push mirror to new GitHub repo
    $ cd repo.git
    $ git push --mirror https://github.com/ghuser/repo.git
    
    # Remove temporary local repo
    $ cd ..
    $ rm -rf repo.git
    
    0 讨论(0)
提交回复
热议问题