logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

hub-pull-request - Create a GitHub Pull Request.

Configuration

HUB_RETRY_TIMEOUT
           The maximum time to keep retrying after HTTP 422 on --push (default: 9).

Examples

           $ hub pull-request
           [ opens a text editor for writing title and message ]
           [ creates a pull request for the current branch ]

           $ hub pull-request --base OWNER:master --head MYUSER:my-branch
           [ creates a pull request with explicit base and head branches ]

           $ hub pull-request --browse -m "My title"
           [ creates a pull request with the given title and opens it in a browser ]

           $ hub pull-request -F - --edit < path/to/message-template.md
           [ further edit the title and message received on standard input ]

Name

       hub-pull-request - Create a GitHub Pull Request.

Options

       -f, --force
           Skip the check for unpushed commits.

       -m, --message MESSAGE
           The text up to the first blank line in MESSAGE is treated as the pull request title, and the rest is
           used as pull request description in Markdown format.

           When multiple --message are passed, their values are concatenated with a blank line in-between.

           When neither --message nor --file were supplied, a text editor will open to author the title and
           description in.

       --no-edit
           Use the message from the first commit on the branch as pull request title and description without
           opening a text editor.

       -F, --file FILE
           Read the pull request title and description from FILE. Pass "-" to read from standard input instead.
           See --message for the formatting rules.

       -e, --edit
           Open the pull request title and description in a text editor before submitting. This can be used in
           combination with --message or --file.

       -i, --issue ISSUE
           Convert ISSUE (referenced by its number) to a pull request.

           You can only convert issues authored by you or that which you have admin rights over. In most
           workflows it is not necessary to convert issues to pull requests; you can simply reference the
           original issue in the body of the new pull request.

       -o, --browse
           Open the new pull request in a web browser.

       -c, --copy
           Put the URL of the new pull request to clipboard instead of printing it.

       -p, --push
           Push the current branch to HEAD before creating the pull request.

       -b, --base BASE
           The base branch in the "[OWNER:]BRANCH" format. Defaults to the default branch of the upstream
           repository (usually "master").

           See the "CONVENTIONS" section of hub(1) for more information on how hub selects the defaults in case
           of multiple git remotes.

       -h, --head HEAD
           The head branch in "[OWNER:]BRANCH" format. Defaults to the currently checked out branch.

       -r, --reviewer USERS
           A comma-separated list (no spaces around the comma) of GitHub handles to request a review from.

       -a, --assign USERS
           A comma-separated list (no spaces around the comma) of GitHub handles to assign to this pull request.

       -M, --milestone NAME
           The milestone name to add to this pull request. Passing the milestone number is deprecated.

       -l, --labels LABELS
           A comma-separated list (no spaces around the comma) of labels to add to this pull request. Labels
           will be created if they do not already exist.

       -d, --draft
           Create the pull request as a draft.

       --no-maintainer-edits
           When creating a pull request from a fork, this disallows projects maintainers from being able to push
           to the head branch of this fork.  Maintainer edits are allowed by default.

See Also

hub(1), hub-merge(1), hub-checkout(1)

hub version 2.14.2                                 24 Aug 2023                               hub-pull-request(1)

Synopsis

hubpull-request [-focpd] [-b BASE] [-h HEAD] [-r REVIEWERS ] [-a ASSIGNEES] [-M MILESTONE] [-l LABELS]
       hubpull-request -m MESSAGE [--edit]
       hubpull-request -F FILE [--edit]
       hubpull-request -i ISSUE

See Also