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

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6675994/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 05:40:58  来源:igfitidea点击:

Is it possible to 'fork a fork' in Github?

gitversion-controlgithubfork

提问by Aron Rotteveel

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)
      • (not yet)Client repository (fork of application)
  • 框架存储库(原始)
    • 通用应用程序存储库(fork)
      • (尚未)客户端存储库(应用程序的分支)

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”时,您将收到一条通知,表明您已经对项目进行了分叉:

Image showing a forked project cannot be forked again

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

采纳答案by Aron Rotteveel

I contacted GitHub support about this 'issue' and they confirmed this is not possible. Also, it is very unlikely that such a feature will be implemented in the future.

我就这个“问题”联系了 GitHub 支持,他们确认这是不可能的。此外,将来实施此类功能的可能性很小。

回答by Jigar

This is now very possible. You just go to the fork you want to fork and click "fork" like you would always do. 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.

由于这是现在的正确答案,因此最好突出显示它。

回答by Koraktor

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.

是的,对于多个帐户。所以你可以为你的第二个分叉设置一个组织。