1hub-pull-request(1) hub manual hub-pull-request(1)
2
3
4
6 hub-pull-request - Create a GitHub Pull Request.
7
9 hub pull-request [-focpd] [-b BASE] [-h HEAD] [-r REVIEWERS ] [-a
10 ASSIGNEES] [-M MILESTONE] [-l LABELS]
11 hub pull-request -m MESSAGE [--edit]
12 hub pull-request -F FILE [--edit]
13 hub pull-request -i ISSUE
14
16 -f, --force
17 Skip the check for unpushed commits.
18
19 -m, --message MESSAGE
20 The text up to the first blank line in MESSAGE is treated as the
21 pull request title, and the rest is used as pull request
22 description in Markdown format.
23
24 When multiple --message are passed, their values are concatenated
25 with a blank line in-between.
26
27 When neither --message nor --file were supplied, a text editor will
28 open to author the title and description in.
29
30 --no-edit
31 Use the message from the first commit on the branch as pull request
32 title and description without opening a text editor.
33
34 -F, --file FILE
35 Read the pull request title and description from FILE. Pass "-" to
36 read from standard input instead. See --message for the formatting
37 rules.
38
39 -e, --edit
40 Open the pull request title and description in a text editor before
41 submitting. This can be used in combination with --message or
42 --file.
43
44 -i, --issue ISSUE
45 Convert ISSUE (referenced by its number) to a pull request.
46
47 You can only convert issues authored by you or that which you have
48 admin rights over. In most workflows it is not necessary to convert
49 issues to pull requests; you can simply reference the original
50 issue in the body of the new pull request.
51
52 -o, --browse
53 Open the new pull request in a web browser.
54
55 -c, --copy
56 Put the URL of the new pull request to clipboard instead of
57 printing it.
58
59 -p, --push
60 Push the current branch to HEAD before creating the pull request.
61
62 -b, --base BASE
63 The base branch in the "[OWNER:]BRANCH" format. Defaults to the
64 default branch of the upstream repository (usually "master").
65
66 See the "CONVENTIONS" section of hub(1) for more information on how
67 hub selects the defaults in case of multiple git remotes.
68
69 -h, --head HEAD
70 The head branch in "[OWNER:]BRANCH" format. Defaults to the
71 currently checked out branch.
72
73 -r, --reviewer USERS
74 A comma-separated list (no spaces around the comma) of GitHub
75 handles to request a review from.
76
77 -a, --assign USERS
78 A comma-separated list (no spaces around the comma) of GitHub
79 handles to assign to this pull request.
80
81 -M, --milestone NAME
82 The milestone name to add to this pull request. Passing the
83 milestone number is deprecated.
84
85 -l, --labels LABELS
86 A comma-separated list (no spaces around the comma) of labels to
87 add to this pull request. Labels will be created if they do not
88 already exist.
89
90 -d, --draft
91 Create the pull request as a draft.
92
93 --no-maintainer-edits
94 When creating a pull request from a fork, this disallows projects
95 maintainers from being able to push to the head branch of this
96 fork. Maintainer edits are allowed by default.
97
99 $ hub pull-request
100 [ opens a text editor for writing title and message ]
101 [ creates a pull request for the current branch ]
102
103 $ hub pull-request --base OWNER:master --head MYUSER:my-branch
104 [ creates a pull request with explicit base and head branches ]
105
106 $ hub pull-request --browse -m "My title"
107 [ creates a pull request with the given title and opens it in a browser ]
108
109 $ hub pull-request -F - --edit < path/to/message-template.md
110 [ further edit the title and message received on standard input ]
111
113 HUB_RETRY_TIMEOUT
114 The maximum time to keep retrying after HTTP 422 on --push
115 (default: 9).
116
118 hub(1), hub-merge(1), hub-checkout(1)
119
120
121
122
123hub version 2.14.2 20 Jul 2023 hub-pull-request(1)