commands.sh

gh pr create

all

Manage GitHub pull requests.

More info →

Options (7)

boolean

Interactively create a pull request

Example: gh pr {{[new|create]}}
-f, --fillboolean

Create a pull request, determining the title and description from the commit messages of the current branch

Example: gh pr {{[new|create]}} {{[-f|--fill]}}
-d, --draftboolean

Create a draft pull request

Example: gh pr {{[new|create]}} {{[-d|--draft]}}
-B, --baseboolean

Create a pull request specifying the base branch, title, and description

Example: gh pr {{[new|create]}} {{[-B|--base]}} {{base_branch}} {{[-t|--title]}} "{{title}}" {{[-b|--body]}} "{{body}}"
-t, --titleboolean

Create a pull request specifying the base branch, title, and description

Example: gh pr {{[new|create]}} {{[-B|--base]}} {{base_branch}} {{[-t|--title]}} "{{title}}" {{[-b|--body]}} "{{body}}"
-b, --bodyboolean

Create a pull request specifying the base branch, title, and description

Example: gh pr {{[new|create]}} {{[-B|--base]}} {{base_branch}} {{[-t|--title]}} "{{title}}" {{[-b|--body]}} "{{body}}"
-w, --webboolean

Start opening a pull request in the default web browser

Example: gh pr {{[new|create]}} {{[-w|--web]}}

Examples (5)

Interactively create a pull request

gh pr [new|create]

Create a pull request, determining the title and description from the commit messages of the current branch

gh pr [new|create] [-f|--fill]

Create a draft pull request

gh pr [new|create] [-d|--draft]

Create a pull request specifying the base branch, title, and description

gh pr [new|create] [-B|--base] base_branch [-t|--title] "title" [-b|--body] "body"

Start opening a pull request in the default web browser

gh pr [new|create] [-w|--web]
made by @shridhargupta | data from tldr-pages