GitHub将请求提交给新的上游分支 [英] GitHub Pull Request to a new Upstream Branch
问题描述
我的工作流程:我有一个远程项目(上游)的分支(起源)。我创建了一个分支,话题/票务。我想创建一个起源分支的拉取请求到同名的全新topic / TICKET分支中的上游项目。换句话说,我不希望向主分支或任何现有分支发送拉请求。
My workflow: I have a fork (origin) of a remote project (upstream). I have created a branch, topic/TICKET. I want to create a pull request of my origin branch to the upstream project in a same-named, brand new "topic/TICKET" branch. In other words, I don't want my pull request toward the master branch or any existing branch.
使用BitBucket时,我有此选项。当我创建我的PR时,我选择了我的起源分支,然后远程分支选择允许创建新分支(topic / TICKET)。
When using BitBucket I have this option. When I create my PR, I select my origin branch and then the remote branch selection allows "Create new branch (topic/TICKET)".
在GitHub中,我不似乎有这个选项。我可以输入新的分支名称;但是,然后继续灰色选项,直到我选择一个有效的,现有的分支上游。
In GitHub I don't appear to have this option. I can type in the new branch name; but then the option to continue greys out until I select a valid, existing branch upstream.
恼人的解决方法是在执行PR之前创建分支上游;但它需要询问可以上游的人 - 在我看来,似乎必须有一种更简单的方法来做到这一点。
The annoying work-around is creating the branches upstream before I perform the PR; but it requires asking someone who can commit upstream -- it seems to me like there must be an easier way to do this.
那么,GitHub有没有办法创建一个pull请求来创建一个新的上游分支,或者这只是一个已知的限制?
So, is there any way with GitHub to create a pull request to create a new upstream branch, or is this just a known limitation?
推荐答案
我不认为你可以在Github上做到这一点。也可以这样认为,因为你不应该在一个项目上创建一个新的分支,而这个分支不一定有推送权限。
即使 do 具有对上游项目的推送访问权限,我并不认为它是一个干净的工作流程。
I don't think you can do that on Github. And also think is okay like that, because you shouldn't be able to "create" a new branch on a project you don't necessarily have push access. Even if you do have push access to the upstream project i don't see it as a clean workflow.
这篇关于GitHub将请求提交给新的上游分支的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!