如何在GitHub上分叉非GitHub仓库?

10 git branch github

这是最好的做法吗?我在想

  • 创建一个仓库,将原始仓库添加为上游远程

  • 创建一个"镜像"仓库,然后分叉

  • 创建一个"镜像"仓库,然后创建一个"主题分支"

  • 还有别的

相关: help.github.com/send-pull-requests

小智 18

这就是我最终做的事情:

  1. 在GitHub上创建新的repo

  2. 克隆新的回购

    git clone git@github.com:svnpenn/spoon-knife.git
    
    Run Code Online (Sandbox Code Playgroud)
  3. 从原始仓库添加源代码

    cd Spoon-Knife
    git remote add upstream git://spoon.com/knife.git
    git fetch upstream
    git merge upstream/master
    
    Run Code Online (Sandbox Code Playgroud)
  4. 将原始源代码推送到新的repo

    git push origin master
    
    Run Code Online (Sandbox Code Playgroud)
  5. 此时您可以开始提交自己的源代码!

来源:help.github.com/fork-a-repo