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

前端 未结 2 531
日久生厌
日久生厌 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: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
    

提交回复
热议问题