GH-PR-MERGE(1) GitHub CLI manual GH-PR-MERGE(1)

# [NAME](#NAME)

gh-pr-merge - Merge a pull request

# [SYNOPSIS](#SYNOPSIS)

**gh pr merge \[&lt;number&gt; | &lt;url&gt; | &lt;branch&gt;] \[flags]**

# [DESCRIPTION](#DESCRIPTION)

Merge a pull request on GitHub.

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

When targeting a branch that requires a merge queue, no merge strategy is required. If required checks have not yet passed, auto-merge will be enabled. If required checks have passed, the pull request will be added to the merge queue. To bypass a merge queue and merge directly, pass the **--admin** flag.

# [OPTIONS](#OPTIONS)

[**--admin**](#admin)

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

[**-A**, **--author-email** **&lt;text&gt;**](#A)

Email text for merge commit author

[**--auto**](#auto)

Automatically merge only after necessary requirements are met

[**-b**, **--body** **&lt;text&gt;**](#b)

Body text for the merge commit

[**-F**, **--body-file** **&lt;file&gt;**](#F)

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

[**-d**, **--delete-branch**](#d)

Delete the local and remote branch after merge

[**--disable-auto**](#disable_auto)

Disable auto-merge for this pull request

[**--match-head-commit** **&lt;SHA&gt;**](#match_head_commit)

Commit SHA that the pull request head must match to allow merge

[**-m**, **--merge**](#m)

Merge the commits with the base branch

[**-r**, **--rebase**](#r)

Rebase the commits onto the base branch

[**-s**, **--squash**](#s)

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

[**-t**, **--subject** **&lt;text&gt;**](#t)

Subject text for the merge commit

# [OPTIONS INHERITED FROM PARENT COMMANDS](#OPTIONS_INHERITED_FROM_PARENT_COMMANDS)

[**-R**, **--repo** **&lt;\[HOST/\]OWNER/REPO&gt;**](#R)

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

# [EXIT CODES](#EXIT_CODES)

0: Successful execution

1: Error

2: Command canceled

4: Authentication required

NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.

# [SEE ALSO](#SEE_ALSO)

[**gh-pr(1)**](/man/os/gh/gh-pr.1)

Sep 2026

---

Document: gh-pr-merge(1) from gh 2.102.0-r0 (Chainguard OS)
Source: https://github.com/cli/cli
