1GH-PR-MERGE(1)                 GitHub CLI manual                GH-PR-MERGE(1)
2
3
4

NAME

6       gh-pr-merge - Merge a pull request
7
8
9

SYNOPSIS

11       gh pr merge [<number> | <url> | <branch>] [flags]
12
13
14

DESCRIPTION

16       Merge a pull request on GitHub.
17
18
19       Without  an  argument,  the  pull  request  that belongs to the current
20       branch is selected.
21
22
23       When targeting a branch that requires a merge queue, no merge  strategy
24       is required.  If required checks have not yet passed, AutoMerge will be
25       enabled.  If required checks have passed,  the  pull  request  will  be
26       added  to the merge queue.  To bypass a merge queue and merge directly,
27       pass the '--admin' flag.
28
29
30

OPTIONS

32       --admin
33              Use administrator privileges to merge a pull request  that  does
34              not meet requirements
35
36
37       -A, --author-email <text>
38              Email text for merge commit author
39
40
41       --auto Automatically merge only after necessary requirements are met
42
43
44       -b, --body <text>
45              Body text for the merge commit
46
47
48       -F, --body-file <file>
49              Read body text from file (use "-" to read from standard input)
50
51
52       -d, --delete-branch
53              Delete the local and remote branch after merge
54
55
56       --disable-auto
57              Disable auto-merge for this pull request
58
59
60       --match-head-commit <SHA>
61              Commit SHA that the pull request head must match to allow merge
62
63
64       -m, --merge
65              Merge the commits with the base branch
66
67
68       -r, --rebase
69              Rebase the commits onto the base branch
70
71
72       -s, --squash
73              Squash  the  commits  into one commit and merge it into the base
74              branch
75
76
77       -t, --subject <text>
78              Subject text for the merge commit
79
80
81

OPTIONS INHERITED FROM PARENT COMMANDS

83       -R, --repo <[HOST/]OWNER/REPO>
84              Select another repository using the [HOST/]OWNER/REPO format
85
86
87

SEE ALSO

89       gh-pr(1)
90
91
92
93                                   Jan 2023                     GH-PR-MERGE(1)
Impressum