是否可以“叉叉”?在Github上?
我目前正在开发一个项目,该项目是我一直在开发的框架的衍生项目(分叉)。
这个项目的目的是非常通用的,但现在我需要为我的客户再次分叉代码库。
目前,我已经为我的客户创建了一个自定义分支,但我宁愿为此拥有一个独立的存储库。
- 是否可以“分叉”?
- 如果不能,我还有哪些替代方案?
情况概述:
- 框架存储库(原始)
- 通用应用程序存储库(fork)
- (还没有)客户端存储库(应用程序的分支)
- 通用应用程序存储库(fork)
注意:当尝试在 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)
- (not yet) Client repository (fork of application)
- Generic application repository (fork)
Note: when trying to 'fork a fork' in Github, you will receive a notification that you have already forked the project:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
iFreilicht 的评论中回答
在 现在是正确答案,最好突出显示它。
Answered in a comment by iFreilicht
Since this is the correct answer now, it is better to highlight it.
我就这个“问题”联系了 GitHub 支持,他们确认这是不可能的。而且,这样的功能将来实现的可能性也很小。
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.
简单的回答:是也不是。
不可以,对于单个帐户,因为您无法创建两个具有相同名称的存储库(并且分叉始终具有相同的名称)。
是的,适用于多个帐户。所以你可以为你的第二个分叉建立一个组织。
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.
我使用分支来跟踪不同的分叉。我主要使用 Github 作为本地存储库的在线版本,以便与其他人共享。所以我的用例可能不是你想要的。不过,我将概述一下我的做法,以防有人觉得它有用。
TL;DR:以下是跟踪协同核心和屏障的代码库示例,它们都是同一存储库的分支。
我有不同的叉子遥控器。
gh 只是 github .ssh/config 中的快捷方式
然后我有一些分支可以根据远程名称跟踪不同的分叉。
我现在可以提取所有更改并保持更新。我可以将分支推送到 Github,并让人们通过切换我的存储库中的分支来访问跟踪的分叉。
I use branches to track different forks. I use Github mainly as an online version of my local repositories to share with others. So my use case may not be what you want. However, I'll outline how I do it in case some find it useful.
TL;DR: Following is an example of a codebase that tracks both the synergy-core and barrier which are both forks of the same repository.
I have different remotes for the forks.
gh is simply a shortcut in the .ssh/config for github
Then I have branches that track the different forks based on the remote names.
I can now pull all the changes and keep them updated. I can push the branches to Github and let people access the tracked forks by switching branches in my repository.
现在,有一个下拉箭头,您可以选择基础存储库
![下拉箭头](https://wx1.sinaimg.cn/mw690/0085fLOFgy1ggk2uyl1nij30pt07174n.jpg)
now,there is a drop-down arrow, you can chose base repository
![drop-down arrow](https://wx1.sinaimg.cn/mw690/0085fLOFgy1ggk2uyl1nij30pt07174n.jpg)