Squash merge and delete the branch.

Section: Reviews and Merge

Squash merge a PR

bash
bash
gh pr merge 123 --squash --delete-branch
Explanation

Squash merge and delete the branch.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Reviews and Merge
Merge a PR
Merge a pull request using a merge commit.
OpenIn sheetbashsame section
Rebase merge a PR
Merge a pull request using rebase.
OpenIn sheetbashsame section
Enable auto-merge
Enable auto-merge once checks pass.
OpenIn sheetbashsame section
Use admin merge
Merge bypassing branch protections if you have admin privileges.
OpenIn sheetbashsame section
Approve a PR
Approve a pull request.
OpenIn sheetbashsame section
Comment on a PR
Leave a review comment.
OpenIn sheetbashsame section