commands.sh

gh pr

all

Manage GitHub pull requests. Some subcommands such as `create` have their own usage documentation.

More info →

Options (4)

boolean

Create a pull request

Example: gh pr {{[new|create]}}
boolean

Check out a specific pull request locally

Example: gh {{[co|pr checkout]}} {{pr_number|url|branch}}
-a, --approveboolean

Approve the pull request for the current branch

Example: gh pr review {{[-a|--approve]}}
-B, --baseboolean

Edit the base branch of a pull request

Example: gh pr edit {{[-B|--base]}} {{branch_name}}

Examples (8)

Create a pull request

gh pr [new|create]

Check out a specific pull request locally

gh [co|pr checkout] pr_number|url|branch

View the changes made in the pull request for the current branch

Approve the pull request for the current branch

gh pr review [-a|--approve]

Merge the pull request associated with the current branch interactively

Edit a pull request interactively

Edit the base branch of a pull request

gh pr edit [-B|--base] branch_name

Check the status of the current repository's pull requests

gh pr status
made by @shridhargupta | data from tldr-pages