If your pull request compares your topic branch with a branch in the upstream repository as the base branch, then your topic branch is also called the "compare branch" of the pull request.
For example:
- Your topic branch (also known as “feature branch”) is the branch where you’re making your changes in your forked repository (e.g.
my-topic-branch
). - The base branch is the branch in the upstream (central) repository that you want to merge your changes into (e.g.
main
). - The pull request compares the changes proposed by the topic branch (
my-topic-branch
) with the base branch (main
), somy-topic-branch
is known as the “compare branch”.
For more information about pull request branches, including examples, see "Creating a pull request."
Note
To open a pull request in a public repository, you must have write access to the head or the source branch or, for organization-owned repositories, you must be a member of the organization that owns the repository to open a pull request.
-
Navigate to the original repository where you created your fork.
-
Above the list of files, in the yellow banner, click Compare & pull request to create a pull request for the associated branch.
-
On the page to create a new pull request, click compare across forks.
-
In the "base branch" dropdown menu, select the branch of the upstream repository you'd like to merge changes into.
-
In the "head fork" dropdown menu, select your fork, then use the "compare branch" drop-down menu to select the branch you made your changes in.
-
Type a title and description for your pull request.
-
On user-owned forks, if you want to allow anyone with push access to the upstream repository to make changes to your pull request, select Allow edits from maintainers.
Warning
If your fork contains GitHub Actions workflows, the option is Allow edits and access to secrets by maintainers. Allowing edits on a fork's branch that contains GitHub Actions workflows also allows a maintainer to edit the forked repository's workflows, which can potentially reveal values of secrets and grant access to other branches.
-
To create a pull request that is ready for review, click Create Pull Request. To create a draft pull request, use the drop-down and select Create Draft Pull Request, then click Draft Pull Request. If you are the member of an organization, you may need to request access to draft pull requests from an organization owner. See "About pull requests."
Tip
After you create a pull request, you can ask a specific person to review your proposed changes. For more information, see "Requesting a pull request review."