How do I create a new GitHub repo from a branch in an existing repo?

前端 未结 6 1414
既然无缘
既然无缘 2020-12-02 03:21

I have master and new-project branches. And now I\'d like to create a brand new repo with its master based on the new-project branch.

6条回答
  •  死守一世寂寞
    2020-12-02 03:58

    Update:

    cd to local repo containing old_branch and:

    $ git push https://github.com/accountname/new_repo.git +old_branch:master
    

提交回复
热议问题