LinuxCommandLibrary

git-pr

Check out GitHub pull requests

TLDR

Check out pull request

$ git pr [123]
copy
Check out from upstream
$ git pr [123] upstream
copy
Clean up PR branch
$ git pr clean [123]
copy
List pull requests
$ git pr list
copy

SYNOPSIS

git pr [number] [remote]

DESCRIPTION

git pr checks out GitHub pull requests locally for testing, reviewing, or contributing. It fetches the pull request reference and creates a local branch named "pr/N" for the specified PR number.
The command simplifies the review workflow by handling ref fetching and branch creation in a single step. For GitLab repositories, the equivalent command is `git mr`.

PARAMETERS

NUMBER

Pull request number.
REMOTE
Remote name (default: origin).
clean NUMBER
Delete local PR branch.
list
List open PRs.
--help
Display help information.

CAVEATS

Part of git-extras package. GitHub-specific functionality. GitLab equivalent is git mr.

HISTORY

git pr is part of git-extras, providing GitHub pull request checkout functionality for local testing and review.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community