How to fork a non-GitHub repo on GitHub?

两盒软妹~` 提交于 2019-12-21 03:59:11

问题


Is there a best practice for this? I was thinking either to

  • Create a repo, add original repo as upstream remote

  • Create a "mirror" repo, then fork that

  • Create a "mirror" repo, then create a "topic branch"

  • Something else

related: help.github.com/send-pull-requests


回答1:


This is what I ended up doing:

  1. Create new repo on GitHub

  2. Clone the new repo

    git clone git@github.com:svnpenn/spoon-knife.git
    
  3. Add source code from original repo

    cd Spoon-Knife
    git remote add upstream git://spoon.com/knife.git
    git fetch upstream
    git merge upstream/master
    
  4. Push original source code to new repo

    git push origin master
    
  5. At this point you can start committing your own source code!

source: help.github.com/fork-a-repo



来源:https://stackoverflow.com/questions/9268849/how-to-fork-a-non-github-repo-on-github

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!