gh pr create

Open a pull request from the current branch

What it does

gh pr create opens a pull request from the branch you are on. If the branch is not on GitHub yet, gh offers to push it. With no flags it asks for the title, the description and what to do next.

--fill takes the title and description from the commits and asks nothing. --title and --body set them explicitly; Closes #12 in the description closes issue 12 when the PR is merged. --draft creates a draft, --base changes the target branch, and --reviewer asks for a review right away.

Syntax

gh pr create --fill
gh pr create --title "<title>" --body "<description>"
gh pr create --draft --base <branch>

Examples

Related commands

Practise · All commands