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

NAME

6       gh-pr-create - Create a pull request
7
8
9

SYNOPSIS

11       gh pr create [flags]
12
13
14

DESCRIPTION

16       Create a pull request on GitHub.
17
18
19       When  the  current  branch isn't fully pushed to a git remote, a prompt
20       will ask where to push the branch and offer an option to fork the  base
21       repository. Use --head to explicitly skip any forking or pushing behavā€
22       ior.
23
24
25       A prompt will also ask for the title and the body of the pull  request.
26       Use %!s(BADINDEX)--titleand --bodyto skip this, or use--fillto autofill
27       these values from git  commits.   It's  important  to  notice  that  if
28       the--titleand/or--bodyare  also  provided  alongside--fill,  the values
29       specified by--titleand/or--body` will take precedence and overwrite any
30       autofilled content.
31
32
33       A  prompt will also ask for the title and the body of the pull request.
34       Use --title and --body to skip this, or use --fill  to  autofill  these
35       values from git commits.
36
37
38       Link  an issue to the pull request by referencing the issue in the body
39       of the pull request. If the body text mentions  Fixes  #123  or  Closes
40       #123,  the referenced issue will automatically get closed when the pull
41       request gets merged.
42
43
44       By default, users with write access to the base repository can push new
45       commits to the head branch of the pull request. Disable this with --no-
46       maintainer-edit.
47
48
49       Adding a pull request  to  projects  requires  authorization  with  the
50       "project" scope.  To authorize, run "gh auth refresh -s project".
51
52
53

OPTIONS

55       -a, --assignee <login>
56              Assign people by their login. Use "@me" to self-assign.
57
58
59       -B, --base <branch>
60              The branch into which you want your code merged
61
62
63       -b, --body <string>
64              Body for the pull request
65
66
67       -F, --body-file <file>
68              Read body text from file (use "-" to read from standard input)
69
70
71       -d, --draft
72              Mark pull request as a draft
73
74
75       -f, --fill
76              Use commit info for title and body
77
78
79       --fill-first
80              Use first commit info for title and body
81
82
83       -H, --head <branch>
84              The branch that contains commits for your pull request (default:
85              current branch)
86
87
88       -l, --label <name>
89              Add labels by name
90
91
92       -m, --milestone <name>
93              Add the pull request to a milestone by name
94
95
96       --no-maintainer-edit
97              Disable maintainer's ability to modify pull request
98
99
100       -p, --project <name>
101              Add the pull request to projects by name
102
103
104       --recover <string>
105              Recover input from a failed run of create
106
107
108       -r, --reviewer <handle>
109              Request reviews from people or teams by their handle
110
111
112       -T, --template <file>
113              Template file to use as starting body text
114
115
116       -t, --title <string>
117              Title for the pull request
118
119
120       -w, --web
121              Open the web browser to create a pull request
122
123
124

OPTIONS INHERITED FROM PARENT COMMANDS

126       -R, --repo <[HOST/]OWNER/REPO>
127              Select another repository using the [HOST/]OWNER/REPO format
128
129
130

EXAMPLE

132              $ gh pr create --title "The bug is fixed" --body "Everything works again"
133              $ gh pr create --reviewer monalisa,hubot  --reviewer myorg/team-name
134              $ gh pr create --project "Roadmap"
135              $ gh pr create --base develop --head monalisa:feature
136
137
138
139
140

SEE ALSO

142       gh-pr(1)
143
144
145
146                                   Oct 2023                    GH-PR-CREATE(1)
Impressum