GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
GH-PR-CREATE(1) GitHub CLI manual GH-PR-CREATE(1)

gh-pr-create - Create a pull request

gh pr create [flags]

Create a pull request on GitHub.

Upon success, the URL of the created pull request will be printed.

When the current branch isn't fully pushed to a git remote, a prompt will ask where to push the branch and offer an option to fork the base repository. Use --head to explicitly skip any forking or pushing behavior.

--head supports <user>:<branch> syntax to select a head repo owned by <user>. Using an organization as the <user> is currently not supported. For more information, see ⟨https://github.com/cli/cli/issues/10093⟩

A prompt will also ask for the title and the body of the pull request. Use --title and --body to skip this, or use --fill to autofill these values from git commits. It's important to notice that if the --title and/or --body are also provided alongside --fill, the values specified by --title and/or --body will take precedence and overwrite any autofilled content.

The base branch for the created PR can be specified using the --base flag. If not provided, the value of gh-merge-base git branch config will be used. If not configured, the repository's default branch will be used. Run git config branch.{current}.gh-merge-base {base} to configure the current branch to use the specified merge base.

Link an issue to the pull request by referencing the issue in the body of the pull request. If the body text mentions Fixes #123 or Closes #123, the referenced issue will automatically get closed when the pull request gets merged.

By default, users with write access to the base repository can push new commits to the head branch of the pull request. Disable this with --no-maintainer-edit.

Adding a pull request to projects requires authorization with the project scope. To authorize, run gh auth refresh -s project.

Assign people by their login. Use "@me" to self-assign.

The branch into which you want your code merged

Body for the pull request

Read body text from file (use "-" to read from standard input)

Mark pull request as a draft

Print details instead of creating the PR. May still push git changes.

Skip prompts and open the text editor to write the title and body in. The first line is the title and the remaining text is the body.

Use commit info for title and body

Use first commit info for title and body

Use commits msg+body for description

The branch that contains commits for your pull request (default [current branch])

Add labels by name

Add the pull request to a milestone by name

Disable maintainer's ability to modify pull request

Add the pull request to projects by title

Recover input from a failed run of create

Request reviews from people or teams by their handle

Template file to use as starting body text

Title for the pull request

Open the web browser to create a pull request

Select another repository using the [HOST/]OWNER/REPO format

gh pr new

0: Successful execution

1: Error

2: Command canceled

4: Authentication required

NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.

$ gh pr create --title "The bug is fixed" --body "Everything works again"
$ gh pr create --reviewer monalisa,hubot  --reviewer myorg/team-name
$ gh pr create --project "Roadmap"
$ gh pr create --base develop --head monalisa:feature
$ gh pr create --template "pull_request_template.md"

gh-pr(1)

Jul 2025

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.