GH-PR-MERGE(1)
π NAME π
gh-pr-merge β Merge a pull request. This is GH-PR-MERGE(1) from the GitHub CLI manual, and tbh itβs giving βletβs merge this PR and make it everyoneβs problem in the best way.β π
β¨ SYNOPSIS β¨
gh pr merge [<number> | <url> | <branch>] [flags]
π¦ DESCRIPTION π¦
Okay so bestie, this command merges a pull request on GitHub. Simple concept, iconic execution. β¨
No argument? Then it selects the pull request that belongs to the current branch. Lowkey convenient, highkey slay.
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. Periodt. π
π OPTIONS π
--adminβ Use administrator privileges to merge a pull request that does not meet requirements.-A,--author-email <text>β Email text for merge commit author.--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.--match-head-commit <SHA>β Commit SHA that the pull request head must match to allow merge.-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/REPOformat.
π EXIT CODES π
0: Successful execution1: Error2: Command canceled4: Authentication required
NOTE: Specific commands may have additional exit codes. Refer to the commandβs help for more information. π«Ά
π«Ά SEE ALSO π«Ά
mwah π β this little page is from GitHub CLI v2.102.0, dated Oct 2026, and thatβs the cute sign-off tea. πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms