1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-07-05 13:35:25 +02:00
tldr/pages/common/gh-pr-merge.md
Managor ad7b6f797c
common*: refresh old pages part 6 (#16288)
Co-authored-by: Machiavelli <145562237+MachiavelliII@users.noreply.github.com>
2025-05-03 05:57:05 +03:00

32 lines
878 B
Markdown

# gh pr merge
> Merge GitHub pull requests.
> More information: <https://cli.github.com/manual/gh_pr_merge>.
- Merge the pull request associated with the current branch interactively:
`gh pr merge`
- Merge the specified pull request, interactively:
`gh pr merge {{pr_number}}`
- Merge the pull request, removing the branch on both the local and the remote:
`gh pr merge {{[-d|--delete-branch]}}`
- Merge the current pull request with the specified merge strategy:
`gh pr merge --{{merge|squash|rebase}}`
- Merge the current pull request with the specified merge strategy and commit message:
`gh pr merge --{{merge|squash|rebase}} {{[-t|--subject]}} {{commit_message}}`
- Squash the current pull request into one commit with the message body and merge:
`gh pr merge {{[-s|--squash]}} {{[-b|--body]}} "{{commit_message_body}}"`
- Display help:
`gh pr merge --help`