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  --title  and  --body to skip this, or use --fill to autofill these
27       values from git commits.  It's important to notice that if the  --title
28       and/or  --body are also provided alongside --fill, the values specified
29       by --title and/or --body will take precedence and  overwrite  any  aut‐
30       ofilled content.
31
32
33       Link  an issue to the pull request by referencing the issue in the body
34       of the pull request. If the body text mentions  Fixes  #123  or  Closes
35       #123,  the referenced issue will automatically get closed when the pull
36       request gets merged.
37
38
39       By default, users with write access to the base repository can push new
40       commits to the head branch of the pull request. Disable this with --no-
41       maintainer-edit.
42
43
44       Adding a pull request  to  projects  requires  authorization  with  the
45       "project" scope.  To authorize, run "gh auth refresh -s project".
46
47
48

OPTIONS

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

OPTIONS INHERITED FROM PARENT COMMANDS

121       -R, --repo <[HOST/]OWNER/REPO>
122              Select another repository using the [HOST/]OWNER/REPO format
123
124
125

EXAMPLE

127       $ gh pr create --title "The bug is fixed" --body "Everything works again"
128       $ gh pr create --reviewer monalisa,hubot  --reviewer myorg/team-name
129       $ gh pr create --project "Roadmap"
130       $ gh pr create --base develop --head monalisa:feature
131
132
133
134
135

SEE ALSO

137       gh-pr(1)
138
139
140
141                                   Nov 2023                    GH-PR-CREATE(1)
Impressum