Github将现有的仓库转换为fork [英] Github convert existing repo to a fork
问题描述
我的组织有一个主存储库,名为org/A.git
.我首先将它作为me/A.git
分支给了Github.我的组织管理员将org/A.git
设为私有,这打破了分叉.然后,他更改了允许分叉私人存储库的设置. me/A.git
仍然不是一个fork,而是一个简单的克隆.如何再次使me/A.git
成为叉子,而不必:
My organisation has a main repo called org/A.git
. I forked it as me/A.git
to Github first. My organisation admin made org/A.git
private, which broke the fork. He then changed settings which would allow forking private repositories. me/A.git
is still not a fork but a simple clone. How can I make me/A.git
a fork again, without having to:
- 再次叉
org/A.git
会导致me/A-1.git
. - 删除
me/A.git
. - 将
me/A-1.git
重命名为me/A.git
. - 将本地更改推送到新的
me/A.git
.
- Fork
org/A.git
again which would result inme/A-1.git
. - Delete
me/A.git
. - Rename
me/A-1.git
tome/A.git
. - Push local changes to the new
me/A.git
.
我想避免上述4个步骤,因为我在原始的me/A.git
中还有其他贡献者和分支机构,并且要照顾所有看起来很简单的事情.
I want to avoid the above 4 steps because I have additional contributors as well as branches in the original me/A.git
and taking care of all that is just cumbersome for something which seems to be so simple.
推荐答案
这是非常非常非常老的...但是,我本人最近也遇到了类似情况,并联系了GitHub支持.对我来说,并不是最初是一个叉子,然后就把它弄坏了,而是在理解叉子是什么之前,我手动创建了自己的仓库(对Git来说还很新).不幸的是,GitHub支持人员确认没有办法.
This is very, very, very old... However, I recently faced a similar circumstance myself, and contacted GitHub Support. For me, it wasn't that it was a fork originally and then it was broken, but rather I created my own repo manually before understanding what a fork was (still new to Git). GitHub Support confirmed there was no way to do it, unfortunately.
他们的报价:
感谢您与我们联系!很抱歉造成麻烦,但是在这种情况下,无法将存储库作为另一个分支的附加存储库-存储库不能从一个分支网络移动到另一个分支网络,也不能移动到最初不是由它们创建的网络.
Thanks for reaching out! Sorry for the trouble, but it isn't possible to attach a repository as a fork of another in this kind of situation -- repositories can't move from one fork network to another, or to a network they were not originally created from.
这篇关于Github将现有的仓库转换为fork的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!