将git repo与现有的分叉网络相关联 [英] Associate git repo with existing fork network

查看:98
本文介绍了将git repo与现有的分叉网络相关联的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用GitHub Enterprise,我分发了一个私人回购。然后,我公开了上游回购协议,这打破了公众上游和我的私人个人分支之间的'分支'关系(正如这里)。我现在也把公开的回购副本。据我所知,我不能再从我的repo副本向上游请求pull请求,因为我的副本没有被识别为上游分支。



我可以将我的repo与上游repo重新关联为fork吗?

解决方案

GitHub支持在我之前删除了fork关系,所以我怀疑他们也可以重新贴上你。



要自己做,我会:


  • 制作上游回购的新分支

  • 将您的个人分支的 origin 更改为新叉



您将失去当前分叉的GitHub历史记录(合并请求等),但是您可以再次与上游合作。

Using GitHub Enterprise, I forked a private repo. I then made the upstream repo public, which broke the 'fork' relationship between the public upstream and my private personal fork (as noted here). I've now also made my copy of the repo public. As far as I can tell, I can no longer make pull requests from my copy of the repo to upstream, because my copy is not recognized as a fork of upstream.

Can I re-associate my repo with the upstream repo as a fork?

解决方案

GitHub support has removed fork relationships for me before, so I suspect they'd also be able to reattach you.

To do it on your own, I'd:

  • Make a new fork of the upstream repo
  • Change your personal fork's origin to the new fork

You'll lose GitHub history for your current fork (Pull Requests, etc.), but you'll be able to work with upstream again.

这篇关于将git repo与现有的分叉网络相关联的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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