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

前端 未结 6 1411
既然无缘
既然无缘 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:48

    Not sure whether this is a good way, but it's easy anyway:

    git clone -b new-project git@github.com:User/YourProject.git newProjcet
    

    Then create a new repo on github, and push it.

提交回复
热议问题