How to turn a git branch into fork?

前端 未结 3 2072
耶瑟儿~
耶瑟儿~ 2021-01-13 00:12

I have created a branch in my GitHub repo: https://github.com/markmnl/FalconUDP, so there are now two branches: \"master\" and \"single-threaded\". I realise now I will neve

3条回答
  •  醉话见心
    2021-01-13 00:52

    If you really want to fork, the way would be:

    1. Clone FalconUDP
    2. in the clone, checkout single-threaded branch

    Now you have two options:

    a) new remote repo

    1. Create new repo
    2. Add it as remote to cloned repo, call it, let's say "new-remote"
    3. git push single-threaded new-remote/master
    4. New repo has contents of single-threaded as master

    b) Local repo

    1. delete branch master
    2. checkout from branch single-threaded into new branch master

提交回复
热议问题