文章版本: GitHub.com
从复刻创建拉取请求
You can create a pull request to propose changes you've made to a fork of an upstream repository.
You can also give the upstream repository's maintainers permission to push commits to a user-owned fork. 如果您的拉取请求将上游仓库中的分支作为与主题分支进行比较的基本分支,则您的主题分支也称为该拉取请求的比较分支 。 For more information about pull request branches, including examples, see "Creating a pull request."
注:要打开公共仓库中的拉取请求,您必须对头部或源分支具有写入权限;对于组织拥有的仓库,您必须是拥有该仓库的组织的成员,才能打开拉取请求。
- Navigate to the original repository where you created your fork.
- 对于 Branch(分支)菜单右侧,单击 New pull request(新拉取请求)。

- 在 Compare(比较)页面上,单击 compare across forks(跨复刻比较)。

- In the "base branch" drop-down menu, select the branch of the upstream repository you'd like to merge changes into.

- In the "head fork" drop-down menu, select your fork, then use the "compare branch" drop-down menu to select the branch you made your changes in.

- 为您的拉取请求输标题和说明。

- On user-owned forks, if you do not want to allow anyone with push access to the upstream repository to make changes to your pull request, unselect Allow edits from maintainers.

- 要创建可供审查的拉取请求,请单击 Create Pull Request(创建拉取请求)。 要创建草稿拉取请求,请使用下拉列表选择 Create Draft Pull Request(创建草稿拉取请求),然后单击 Draft Pull Request(草稿拉取请求)。 有关拉取请求草稿的更多信息,请参阅“关于拉取请求”。

延伸阅读
- "使用复刻"
- “创建拉取请求”
- "允许更改创建自复刻的拉取请求分支"
- "提交更改至创建自复刻的拉取请求分支"