git-pr is the top-level command for interacting with pull requests on a source code hosting platform like GitLab or GitHub. The top-level command git-pr doesn't do anything by itself, instead it delegates all functionality to multiple sub-commands. The available sub-commands to git-pr are:
For more information about a sub-command, see its own wiki page.
$ git pr -h
git-pr is used for interacting with pull requests from a command line.
The following sub-commands are available:
- apply -- apply a pull request
Usage: git pr apply [<ID>]
Flags:
-u, --username NAME Username on host
-r, --remote NAME Name of remote, defaults to 'origin'
--no-token Do not use a personal access token (PAT)
--verbose Turn on verbose output
--debug Turn on debugging output
--version Print the version of this tool
- approve -- approve a pull request
Usage: git pr approve [<ID>]
Flags:
-u, --username NAME Username on host
-r, --remote NAME Name of remote, defaults to 'origin'
--verbose Turn on verbose output
--debug Turn on debugging output
--version Print the version of this tool
- checkout -- checkout a pull request
Usage: git pr checkout [<ID>]
Flags:
-u, --username NAME Username on host
-r, --remote NAME Name of remote, defaults to 'origin'
-b, --branch NAME Name of target branch, defaults to 'master'
--no-token Do not use a personal access token (PAT)
--verbose Turn on verbose output
--debug Turn on debugging output
--version Print the version of this tool
- close -- close a pull request
Usage: git pr close [<ID>]
Flags:
-u, --username NAME Username on host
-r, --remote NAME Name of remote, defaults to 'origin'
--verbose Turn on verbose output
--debug Turn on debugging output
--version Print the version of this tool
- create -- create a pull request
Usage: git pr create [<ID>]
Flags:
-u, --username NAME Username on host
-r, --remote NAME Name of remote, defaults to 'origin'
-b, --branch NAME Name of target branch, defaults to 'master'
--cc MAILING LISTS Mailing lists to CC for inital RFR e-mail
--ignore-workspace Ignore local changes in worktree and staging area when creating pull request
--ignore-local-commits Ignore local commits not pushed when creating pull request
--publish Publish the local branch before creating the pull request
--jcheck Run jcheck before creating the pull request
--draft Create a pull request in draft state
--verbose Turn on verbose output
--debug Turn on debugging output
--version Print the version of this tool
- fetch -- fetch a pull request
Usage: git pr fetch [<ID>]
Flags:
-u, --username NAME Username on host
-r, --remote NAME Name of remote, defaults to 'origin'
-b, --branch NAME Name of target branch, defaults to 'master'
--no-token Do not use a personal access token (PAT)
--verbose Turn on verbose output
--debug Turn on debugging output
--version Print the version of this tool
- info -- show status of a pull request
Usage: git pr info [<ID>]
Flags:
-u, --username NAME Username on host
-r, --remote NAME Name of remote, defaults to 'origin'
--no-decoration Hide any decorations when listing PRs
--no-token Do not use a personal access token (PAT)
--checks Show information about checks
--author Show the author of the pull request
--title Show the title of the pull request
--assignees Show the assignees of the pull request
--reviewers Show the reviewers of the pull request
--contributors Show the additional contributors to the pull request
--issues Show the issues associated with the pull request
--commits Show the commits in pull request
--branch Show the target branch for the pull request
--url Show the url for the pull request
--status Show the status for the pull request
--labels Show the labels for the pull request
--verbose Turn on verbose output
--debug Turn on debugging output
--version Print the version of this tool
- integrate -- integrate a pull request
Usage: git pr integrate [<ID>]
Flags:
-u, --username NAME Username on host
-r, --remote NAME Name of remote, defaults to 'origin'
--atomic Integrate the pull request atomically
--verbose Turn on verbose output
--debug Turn on debugging output
--version Print the version of this tool
- list -- list open pull requests
Usage: git pr list [<ID>]
Flags:
-u, --username NAME Username on host
-r, --remote NAME Name of remote, defaults to 'origin'
--authors LIST Comma separated list of authors
--assignees LIST Comma separated list of assignees
--labels LIST Comma separated list of labels
--issues LIST Comma separated list of issues
--columns id,title,author,assignees,labels Comma separated list of columns to show
--no-decoration Hide any decorations when listing PRs
--no-draft Hide all pull requests in draft state
--no-token Do not use a personal access token (PAT)
--verbose Turn on verbose output
--debug Turn on debugging output
--version Print the version of this tool
- set -- set properties of a pull request
Usage: git pr set [<ID>]
Flags:
-u, --username NAME Username on host
-r, --remote NAME Name of remote, defaults to 'origin'
--assignees LIST Comma separated list of assignees
--title MESSAGE The title of the pull request
--open Set the pull request's state to open
--closed Set the pull request's state to closed
--body Set the body of the pull request
--no-draft Mark the pull request as not draft
--verbose Turn on verbose output
--debug Turn on debugging output
--version Print the version of this tool
- show -- show a pull request
Usage: git pr show [<ID>]
Flags:
-u, --username NAME Username on host
-r, --remote NAME Name of remote, defaults to 'origin'
--no-token Do not use a personal access token (PAT)
--verbose Turn on verbose output
--debug Turn on debugging output
--version Print the version of this tool
- sponsor -- sponsor a pull request
Usage: git pr sponsor [<ID>]
Flags:
-u, --username NAME Username on host
-r, --remote NAME Name of remote, defaults to 'origin'
--verbose Turn on verbose output
--debug Turn on debugging output
--version Print the version of this tool
- test -- test a pull request
Usage: git pr test [<ID>]
Flags:
-u, --username NAME Username on host
-r, --remote NAME Name of remote, defaults to 'origin'
--verbose Turn on verbose output
--debug Turn on debugging output
--version Print the version of this tool |
There is no configuration for the top-level git-pr command, but many of the sub-commands can be configured. See each sub-command's wiki page for more information on how configure a particular sub-command.
Please see GitPr.java.