HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

gh pr create — Manage GitHub pull requests. More information: <https://cli.github.com/manual/gh_pr_create>.

Submitted by: @import:tldr-pages··
0
Viewed 0 times
commandpullgh pr creategithubrequestsmanageclimore

Problem

How to use the gh pr create command: Manage GitHub pull requests. More information: <https://cli.github.com/manual/gh_pr_create>.

Solution

gh pr create — Manage GitHub pull requests. More information: <https://cli.github.com/manual/gh_pr_create>.

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]}}

Code Snippets

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]}}

Context

tldr-pages: common/gh pr create

Revisions (0)

No revisions yet.