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.
28
29
30       Link an issue to the pull request by referencing the issue in the  body
31       of  the  pull  request.  If the body text mentions Fixes #123 or Closes
32       #123, the referenced issue will automatically get closed when the  pull
33       request gets merged.
34
35
36       By default, users with write access to the base repository can push new
37       commits to the head branch of the pull request. Disable this with --no-
38       maintainer-edit.
39
40
41

OPTIONS

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

OPTIONS INHERITED FROM PARENT COMMANDS

106       -R, --repo <[HOST/]OWNER/REPO>
107              Select another repository using the [HOST/]OWNER/REPO format
108
109
110

EXAMPLE

112              $ gh pr create --title "The bug is fixed" --body "Everything works again"
113              $ gh pr create --reviewer monalisa,hubot  --reviewer myorg/team-name
114              $ gh pr create --project "Roadmap"
115              $ gh pr create --base develop --head monalisa:feature
116
117
118
119
120

SEE ALSO

122       gh-pr(1)
123
124
125
126                                   Jan 2023                    GH-PR-CREATE(1)
Impressum