简体   繁体   English

从不是 github 上的 fork 的存储库创建拉取请求

[英]Create a pull request from a repository that is not a fork on github

forking iss not allowed (for this repository on github).不允许分叉(对于 github 上的这个存储库)。 So what I did was I cloned the repository to my local folder, Then made my changes and did a commit.所以我所做的是将存储库克隆到我的本地文件夹,然后进行更改并提交。 then pushed it into my own repository on github.然后将其推送到我自己在 github 上的存储库中。

Problem, my repository is not denoted as a fork in github.问题,我的存储库在 github 中没有表示为分叉。 So there is no way to create a pull request to the original repository.所以无法向原始存储库创建拉取请求。

How do I set my upstream in github?如何在 github 中设置我的上游?

I tried to set upstream using git remote add, and create a pull request using git request-pull.我尝试使用 git remote add 设置上游,并使用 git request-pull 创建拉取请求。 But while the commands were successful, nothing showed up in github... my repository still does not show as a fork但是虽然命令成功了,但 github 中什么也没显示......我的存储库仍然没有显示为一个分支

when I try to create a pull request from the website, pushing "new pull request" button, I only see the same branch, I do not see my own fork even when choosing "across forks"当我尝试从网站创建拉取请求,按下“新拉取请求”按钮时,我只看到同一个分支,即使选择“跨叉”也看不到我自己的叉

You cannot create a pull request from a repository that is not a fork.您不能从不是复刻的存储库创建拉取请求。 On GitHub, all the forks, plus the main repository, form a repository network, which shares objects.在 GitHub 上,所有的分叉,加上主存储库,形成一个存储库网络,共享对象。 This is a requirement in order to create a pull request.这是创建拉取请求的要求。

If you have push access to the original repository, then you can push your branch there and create a pull request from there.如果您对原始存储库具有推送访问权限,那么您可以将您的分支推送到那里并从那里创建拉取请求。 If you don't and the repository owner has prohibited forking, then you'll need to talk with them about how to get your change proposed.如果您不这样做并且存储库所有者禁止分叉,那么您需要与他们讨论如何提出您的更改。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM