How to fork a non-GitHub repo on GitHub?

后端 未结 2 1870
猫巷女王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

    0 讨论(0)
  • 2021-02-05 18:24

    GitHub allows you to import an existing repository on Git, Subversion, Mercurial, and TFS.

    See https://github.com/new/import

    0 讨论(0)
提交回复
热议问题