tldr/pages/common/gh-pr.md

33 lines
582 B
Markdown
Raw Normal View History

2021-01-11 16:23:31 +00:00
# gh pr
2020-10-19 18:29:43 +01:00
> Manage GitHub pull requests from the command line.
> More information: <https://cli.github.com/manual/gh_pr>.
- Create a pull request:
`gh pr create`
- Check out a pull request locally:
`gh pr checkout {{pr_number}}`
- View the changes made in the PR:
`gh pr diff`
- Approve the pull request of the current branch:
`gh pr review --approve`
2021-04-15 18:04:49 +01:00
- Merge the pull request associated with the current branch interactively:
2020-10-19 18:29:43 +01:00
`gh pr merge`
- Edit a pull request interactively:
`gh pr edit`
- Edit the base branch of a pull request:
`gh pr edit --base {{branch_name}}`