gh-pr - Man Page
Manage pull requests
Examples (TL;DR)
- Create a pull request: 
gh pr [new|create] - Check out a specific pull request locally: 
gh [co|pr checkout] pr_number|url|branch - View the changes made in the pull request for the current branch: 
gh pr diff - Approve the pull request for the current branch: 
gh pr review [-a|--approve] - Merge the pull request associated with the current branch interactively: 
gh pr merge - Edit a pull request interactively: 
gh pr edit - Edit the base branch of a pull request: 
gh pr edit [-B|--base] branch_name - Check the status of the current repository's pull requests: 
gh pr status 
Synopsis
gh pr <command> [flags]
Description
Work with GitHub pull requests.
General Commands
- gh-pr-create(1)
 Create a pull request
- gh-pr-list(1)
 List pull requests in a repository
- gh-pr-status(1)
 Show status of relevant pull requests
Targeted Commands
- gh-pr-checkout(1)
 Check out a pull request in git
- gh-pr-checks(1)
 Show CI status for a single pull request
- gh-pr-close(1)
 Close a pull request
- gh-pr-comment(1)
 Add a comment to a pull request
- gh-pr-diff(1)
 View changes in a pull request
- gh-pr-edit(1)
 Edit a pull request
- gh-pr-lock(1)
 Lock pull request conversation
- gh-pr-merge(1)
 Merge a pull request
- gh-pr-ready(1)
 Mark a pull request as ready for review
- gh-pr-reopen(1)
 Reopen a pull request
- gh-pr-review(1)
 Add a review to a pull request
- gh-pr-unlock(1)
 Unlock pull request conversation
- gh-pr-update-branch(1)
 Update a pull request branch
- gh-pr-view(1)
 View a pull request
Options
- -R, --repo <[HOST/]OWNER/REPO>
 Select another repository using the [HOST/]OWNER/REPO format
Exit Codes
0: Successful execution
1: Error
2: Command canceled
4: Authentication required
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
Example
$ gh pr checkout 353 $ gh pr create --fill $ gh pr view --web
See Also
Referenced By
gh(1), gh-pr-checkout(1), gh-pr-checks(1), gh-pr-close(1), gh-pr-comment(1), gh-pr-create(1), gh-pr-diff(1), gh-pr-edit(1), gh-pr-list(1), gh-pr-lock(1), gh-pr-merge(1), gh-pr-ready(1), gh-pr-reopen(1), gh-pr-review(1), gh-pr-status(1), gh-pr-unlock(1), gh-pr-update-branch(1), gh-pr-view(1).