如果我已经分叉了一个不同的叉子,我该如何分叉原始仓库 [英] How can I fork the original repo when I've already forked a different fork

查看:120
本文介绍了如果我已经分叉了一个不同的叉子,我该如何分叉原始仓库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我之前分叉了jockm / vert.x并向他发送了一个pull请求。现在我想fork vert-x / vert.x(jockm / vert.x的上游)并向它们发送不同的拉取请求。但是,当我点击Fork按钮时,我不会轻易地将其结束于我的jockm / vert.x的tjcrowder / vert.x分支中。是否有可能同时fork vert-x / vert.x和jockm / vert.x,这样我可以根据需要发送每个pull请求?



我担心答案可能与(没有GitHub的方式,但你可以添加一个远程回购),但我希望否则 —这不仅仅是因为我没有看到那里的答案会允许我向新的远程发送请求。

没有GitHub的方式(小谎言,见下文),但也没有什么可怕的。



根据定义,叉的叉 a原来的叉子。
当您打开拉取请求时,您可以选择拉取请求的来源和目的地。这里可用的选择显然取决于叉形图,但只要在两个存储库之间的图中存在路径,就应该是安全的。
此外,由于拉请求在网站端生效,所以只要您不想从git使用它,您甚至不需要添加远程。


$ b $当然,你可能想重新考虑你在那张图表上的位置,并让自己成为真正的上游的直接孩子,但这大多是不相关的。

如前所述,实际上有一种扭曲的方式来拥有多个分叉,即创建组织和分叉。这样,您可以在同一个图中拥有多个存储库。但真的没有必要去那里。


I've previously forked jockm/vert.x and sent him a pull request. Now I want to fork vert-x/vert.x (the upstream of jockm/vert.x) and send them a different pull request. But when I click the Fork button, unsuprisingly I end up in my tjcrowder/vert.x fork of jockm/vert.x instead. Is it possible to fork both vert-x/vert.x and jockm/vert.x simultaneously such that I can send each pull requests as appropriate?

I fear the answer may be the same as for this question about the converse situation ("there's no GitHub way, but you can add a remote repo") but I'm hoping otherwise — not least because I don't see how the answer there would allow me to send pull requests to the new remote.

解决方案

There's no GitHub way (small lie, see below), but there's also nothing to fear.

By definition, your fork of a fork is a fork of the original. When you open a pull request, you get the option to choose both the origin and the destination for your pull request. The choices available there obviously depend on the fork graph, but as long as there is a path in the graph between the 2 repositories, you should be safe. Also, since pull requests live on the website side, you don't even need to add a remote as long as you don't want to use it from git.

Now of course, you might want to reconsider your place in that graph, and make yourself a direct child of the real upstream, but that's mostly unrelated.

As said earlier there is actually a twisted way to have multiple forks, which is to create organizations and fork in them. That way you can "own" multiple repositories in the same graph. But there's really no need to go there.

这篇关于如果我已经分叉了一个不同的叉子,我该如何分叉原始仓库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆