GitHub CLI Repos and Pull Requests/Create PR with explicit title/body

Create a pull request non-interactively.

Section: Pull Requests Core

Create PR with explicit title/body

bash
bash
gh pr create --title "Add health endpoint" --body "Adds /healthz" --base main --head feature/health
Explanation

Create a pull request non-interactively.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Pull Requests Core
Create a PR interactively
Create a pull request.
OpenIn sheetbashsame section
Create PR with autofill
Autofill title and body from commits.
OpenIn sheetbashsame section
List pull requests
List open pull requests for the current repo.
OpenIn sheetbashsame section
List closed PRs
List pull requests by state.
OpenIn sheetbashsame section
View a PR
Show details for a pull request.
OpenIn sheetbashsame section
Check out a PR
Fetch and switch to a pull request locally.
OpenIn sheetbashsame section