gh-pr-merge - Man Page

Merge a pull request

Examples (TL;DR)

Synopsis

gh pr merge [<number> | <url> | <branch>] [flags]

Description

Merge a pull request on GitHub.

Without an argument, the pull request that belongs to the current branch is selected.

Options

--admin

Use administrator privileges to merge a pull request that does not meet requirements

--auto

Automatically merge only after necessary requirements are met

-b,  --body <text>

Body text for the merge commit

-F,  --body-file <file>

Read body text from file (use "-" to read from standard input)

-d,  --delete-branch

Delete the local and remote branch after merge

--disable-auto

Disable auto-merge for this pull request

-m,  --merge

Merge the commits with the base branch

-r,  --rebase

Rebase the commits onto the base branch

-s,  --squash

Squash the commits into one commit and merge it into the base branch

-t,  --subject <text>

Subject text for the merge commit

Options Inherited from Parent Commands

-R,  --repo <[HOST/]OWNER/REPO>

Select another repository using the [HOST/]OWNER/REPO format

See Also

gh-pr(1)

Referenced By

gh-pr(1).

Jan 2022 GitHub CLI manual