问题描述
我创建了一个公共仓库,并将新仓库私有化.
I forked a public repo and made the new repo private.
我在我的私人仓库中添加了一个新的远程分支,并提交了一些修复程序.
I added a new remote branch on my private repo with some fixes committed.
现在,我想创建一个从我的私有仓库中的分支向我派生的公共仓库的拉取请求.
Now, I want to create a pull request from the branch in my private repo towards the public repo I forked from.
我在我的私人仓库中选择了分支,然后单击请求".
I select the branch in my private repo and click "Pull request".
我点击更改提交".
我无法更改组织/存储库所有者.我只看到我的组织,但没有看到公共回购之一.我只能针对私人仓库的主分支创建拉取请求,但这不是我想要的.
I can't change the organisation/repo owner. I only see my organisation, but not the one of the public repo. I could only create a pull request against master branch of my private repo, but that's not what I want.
是否不可能在私人仓库中修复某个公共仓库,然后再创建请求请求?
Is it not possible to fix something of a public repo in a private one and create a pull request afterwards?
推荐答案
一种解决方案是将原始公共仓库插入GitHub上您自己的公共仓库.
然后,将该(您拥有的)公共仓库分叉到一个私人仓库中.
One solution would be to fork the original public repo into your own public repo on GitHub.
Then fork that public repo (that you own) into a private one.
然后您在本地工作站上同时克隆了两个,以及:
You then clone both on your local workstation, and:
- 对您的私有本地存储库进行公开和私有修改
- 将任何公共修改推送到本地公共存储库(您可以将其推送到GitHub公共存储库)
- 从GitHub上的分叉公共仓库发出拉取请求.
这篇关于GitHub从私人回购请求到公共回购的可能吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!