1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/gh-pr.md

38 lines
760 B
Markdown
Raw Normal View History

2021-01-11 13:23:31 -03:00
# gh pr
2020-10-20 01:29:43 +08:00
> Manage GitHub pull requests.
> Some subcommands such as `gh pr create` have their own usage documentation.
2020-10-20 01:29:43 +08:00
> More information: <https://cli.github.com/manual/gh_pr>.
- Create a pull request:
`gh pr create`
- Check out a specific pull request locally:
2020-10-20 01:29:43 +08:00
`gh pr checkout {{pr_number}}`
- View the changes made in the pull request for the current branch:
2020-10-20 01:29:43 +08:00
`gh pr diff`
- Approve the pull request for the current branch:
2020-10-20 01:29:43 +08:00
`gh pr review --approve`
2021-04-15 14:04:49 -03:00
- Merge the pull request associated with the current branch interactively:
2020-10-20 01:29:43 +08: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}}`
- Check the status of the current repository's pull requests:
`gh pr status`