GH-PR-CLOSE(1)
π gh-pr-close β bestie's guide to closing a PR
okay so real talk, this is the gh-pr-close page from the GitHub CLI manual (yes, the GH-PR-CLOSE(1) one, we're being fancy today β¨), and it's genuinely so simple it's giving "one job and she does it." You wanna close a pull request? Say less. π«Ά
πΈ NAME πΈ
gh-pr-close β close a pull request. that's it. that's the whole vibe. π
β¨ SYNOPSIS β¨
gh pr close {<number> | <url> | <branch>} [flags]
so you point it at a PR and it closes it. and look, you've got options for how you point at it, because we're not gonna make you memorize numbers like some kind of monster:
- a
<number>β the PR's number, iconic and direct π - a
<url>β just paste the whole link, no thoughts needed π¦ - a
<branch>β the branch name, for the girlies who think in branches
pick one, any one. then add your [flags] if you're feeling extra. π
π OPTIONS π
-c,--comment <string>β drop a closing comment on your way out. like leaving a little goodbye note but make it professional π takes a<string>, obviously.-d,--delete-branchβ delete both the local and remote branch after the close. highkey the most satisfying flag on this whole page. clean up your mess, queen π§Ήβ¨ (and yes, it's both β local and remote, no cap.)
π OPTIONS INHERITED FROM PARENT COMMANDS π
-R,--repo <[HOST/]OWNER/REPO>β pick a different repository using the[HOST/]OWNER/REPOformat. so you can be like "not this one, that one" across the whole group chat π
π₯ EXIT CODES π₯
vibe check time, here's what the numbers mean when she comes back:
0β Successful execution. slay. it worked. π1β Error. something went sideways, rip π2β Command canceled. you (or something) hit the brakes π4β Authentication required. she doesn't know you like that yet, log in π
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information. fr fr, check the command's own help if you're getting a number that's not on this list π
π¦ SEE ALSO π¦
gh-pr(1)β the parent page, go say hi to the wholegh prfamily, they miss you π
and that's the whole page bestie!! no notes, ate and left no crumbs. πΈ
okay and for the little sign-off the manpage insists on: this was GitHub CLI v2.102.0, dated Oct 2026 β so go forth and close those PRs, you gorgeous main character, and remember: delete the branch, it's the right thing to do π π
π¦ where this page comes from
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms