GitHub CLI 2 · Pull requests
Squash-merge and delete the branch
Merge a pull request as a single commit and delete its branch.
gh pr merge 123 --squash --delete-branch
Caution: Merging changes the base branch for everyone. Check the checks and reviews first.
Official GitHub CLI 2 documentation