简体   繁体   English

是否可以在 Github 中“分叉”?

[英]Is it possible to 'fork a fork' in Github?

I am currently working on a project that is a spinoff (fork) from a framework I have been working on.我目前正在从事一个项目,该项目是我一直在研究的框架的衍生(分支)。

This project is intended to be pretty generic, but now I need to fork the codebase again for a client of mine.该项目旨在非常通用,但现在我需要为我的客户再次分叉代码库。

At this moment, I have created a custom branch for my client, but I'd rather have a standalone repository for this.此时,我已经为我的客户创建了一个自定义分支,但我宁愿为此拥有一个独立的存储库。

  • Is is possible to 'fork a fork'?是否可以“分叉”?
  • If not, what alternatives do I have?如果没有,我有什么选择?

Outline of the situation:情况概要:

  • Framework repository (original)框架存储库(原始)
    • Generic application repository (fork)通用应用程序存储库(fork)
      • (not yet) Client repository (fork of application) (尚未)客户端存储库(应用程序的分支)

Note: when trying to 'fork a fork' in Github, you will receive a notification that you have already forked the project:注意:当尝试在 Github 中“fork a fork”时,您将收到一条通知,表明您已经对项目进行了 fork:

显示分叉项目的图像无法再次分叉

This is now very possible.现在这是非常可能的。 You just go to the fork you want to fork and click "fork" like you would always do.您只需 go 到您要分叉的分叉,然后像往常一样单击“分叉”。 This only works if you don't have a different fork of that repository in your account already, though.但是,这仅在您的帐户中没有该存储库的其他分支时才有效。 If you do, you have to delete it.如果这样做,则必须将其删除。

Answered in a comment by iFreilicht iFreilicht在评论中回答

Since this is the correct answer now, it is better to highlight it.既然这是现在的正确答案,最好突出显示它。

I contacted GitHub support about this 'issue' and they confirmed this is not possible.我就这个“问题”联系了 GitHub 支持,他们确认这是不可能的。 Also, it is very unlikely that such a feature will be implemented in the future.此外,未来不太可能实现这样的功能。

Simple answer: Yes and no.简单的回答:是和不是。

No, for a single account as you are unable to create two repositories with the same name (and forks always have the same name).不,对于单个帐户,因为您无法创建两个具有相同名称的存储库(并且分叉始终具有相同的名称)。

Yes, for multiple accounts.是的,对于多个帐户。 So you could setup an organization for your second fork.所以你可以为你的第二个分叉设置一个组织。

now,there is a drop-down arrow, you can chose base repository现在,有一个下拉箭头,您可以选择基础存储库下拉箭头

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM