Squash-merge the current branch's PR, delete the remote branch, and checkout main
Squash-merge the current branch's PR into main, delete the remote branch, and switch to an updated main locally.
Current branch: !git branch --show-current
Open PRs for this branch: !gh pr list --head $(git branch --show-current) --json number,title,url --jq '.[] | "#\(.number) \(.title) \(.url)"' 2>/dev/null || echo "(none)"
Uncommitted changes: !git status --short
main. If it is, abort with: "Already on main — nothing to merge."gh pr merge <number> --squash --delete-branch
git checkout maingit pull to get the squash-merged commit.--delete-branch.git branch -d <branch-name>
-d fails (branch not fully merged — shouldn't happen after squash-merge), use -D and note it.git log --oneline -3 to show the latest commits on main including the squash-merge.<branch> cleaned up."