snippetbashTip
gh pr merge — Merge a GitHub pull request. More information: <https://cli.github.com/manual/gh_pr_merge>.
Viewed 0 times
commandgh pr mergepullgithubclimoremergerequest
Problem
How to use the
gh pr merge command: Merge a GitHub pull request. More information: <https://cli.github.com/manual/gh_pr_merge>.Solution
gh pr merge — Merge a GitHub pull request. More information: <https://cli.github.com/manual/gh_pr_merge>.Merge the pull request associated with the current branch interactively:
gh pr mergeMerge the current branch into the specified pull request:
gh pr merge {{pr_number}} {{[-m|--merge]}}Squash and merge a pull request, then delete the branch:
gh pr merge {{pr_number}} {{[-sd|--squash --delete-branch]}}Rebase and merge:
gh pr merge {{pr_number}} {{[-r|--rebase]}}Enable auto-merge (squash):
gh pr merge {{pr_number}} --auto {{[-s|--squash]}}Merge with admin privileges (if allowed):
gh pr merge {{pr_number}} --adminCode Snippets
Merge the pull request associated with the current branch interactively
gh pr mergeMerge the current branch into the specified pull request
gh pr merge {{pr_number}} {{[-m|--merge]}}Squash and merge a pull request, then delete the branch
gh pr merge {{pr_number}} {{[-sd|--squash --delete-branch]}}Rebase and merge
gh pr merge {{pr_number}} {{[-r|--rebase]}}Enable auto-merge (squash)
gh pr merge {{pr_number}} --auto {{[-s|--squash]}}Context
tldr-pages: common/gh pr merge
Revisions (0)
No revisions yet.