How to fork a non-GitHub repo on GitHub?

后端 未结 2 1869
猫巷女王i
猫巷女王i 2021-02-05 17:20

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 f

2条回答
  •  悲哀的现实
    2021-02-05 18:24

    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

提交回复
热议问题