我如何分叉一个公共存储库,但使我的分叉私有?我确实订阅了支持私有存储库。


当前回答

去https://github.com/new/import吧。

在“您的旧存储库的克隆URL”部分粘贴您想要的回购URL,并在“隐私”中选择“私有”。

其他回答

你必须复制一份回购

你可以看到这个文档(来自github)

To create a duplicate of a repository without forking, you need to run a special clone command against the original repository and mirror-push to the new one. In the following cases, the repository you're trying to push to--like exampleuser/new-repository or exampleuser/mirrored--should already exist on GitHub. See "Creating a new repository" for more information. Mirroring a repository To make an exact duplicate, you need to perform both a bare-clone and a mirror-push. Open up the command line, and type these commands: $ git clone --bare https://github.com/exampleuser/old-repository.git # Make a bare clone of the repository $ cd old-repository.git $ git push --mirror https://github.com/exampleuser/new-repository.git # Mirror-push to the new repository $ cd .. $ rm -rf old-repository.git # Remove our temporary local repository If you want to mirror a repository in another location, including getting updates from the original, you can clone a mirror and periodically push the changes. $ git clone --mirror https://github.com/exampleuser/repository-to-mirror.git # Make a bare mirrored clone of the repository $ cd repository-to-mirror.git $ git remote set-url --push origin https://github.com/exampleuser/mirrored # Set the push location to your mirror As with a bare clone, a mirrored clone includes all remote branches and tags, but all local references will be overwritten each time you fetch, so it will always be the same as the original repository. Setting the URL for pushes simplifies pushing to your mirror. To update your mirror, fetch updates and push, which could be automated by running a cron job. $ git fetch -p origin $ git push --mirror

https://help.github.com/articles/duplicating-a-repository

目前的答案有点过时了,所以,为了清楚起见:

简单的回答是:

做一个公共回购的纯克隆。 创建一个新的私有的。 做一个镜像推送到新的私有。

这在GitHub上有文档:复制一个存储库

去https://github.com/new/import吧。

在“您的旧存储库的克隆URL”部分粘贴您想要的回购URL,并在“隐私”中选择“私有”。

现在多了一个选择(2015年1月)

创建一个新的私有回购 在空的回购屏幕上有一个“导入”选项/按钮 点击它,并把现有的github回购url 没有github选项提到,但它与github回购工作太。 完成

GitHub现在有一个导入选项,可以让你选择任何你想要的新导入的公共或私有存储库