GH-PR-REVERT(1)

πŸ’… gh-pr-revert πŸ’…

okay so real talk, this is a page from the GitHub CLI manual β€” the gh-pr-revert one specifically β€” and honestly? it's giving "undo button but make it official." πŸŽ€

✨ NAME ✨

gh-pr-revert β€” revert a pull request, bestie. that's the whole vibe. πŸ¦‹

🌸 SYNOPSIS 🌸

gh pr revert {<number> | <url> | <branch>} [flags]

so you point it at a pull request β€” by its number, by its url, or by its branch β€” and it does the reverting thing. pick one of those three, okay? the curly braces are literally telling you it's a "choose your fighter" situation. 🫢

πŸ’– OPTIONS πŸ’–

  • -b, --body <string> β€” the body text for the revert pull request. like, what do you wanna say in the description? put it here. ✍️
  • -F, --body-file <file> β€” read the body text from a file instead. and yes, you can pass "-" to read it from standard input β€” iconic behavior honestly. πŸ“
  • -d, --draft β€” mark the revert pull request as a draft. not ready for the world yet, and that's valid. πŸ™ˆ
  • -t, --title <string> β€” the title for the revert pull request. name your child. πŸ‘‘

🌈 OPTIONS INHERITED FROM PARENT COMMANDS 🌈

  • -R, --repo <[HOST/]OWNER/REPO> β€” select another repository using the [HOST/]OWNER/REPO format. yes that bracket situation is on purpose, copy it exactly, don't come for me. πŸ’€

⭐ EXIT CODES ⭐

okay so when this thing finishes, it tells you how it went:

  • 0: Successful execution β€” slay, it worked. βœ…
  • 1: Error β€” something went sideways. 😭
  • 2: Command canceled β€” you (or something) hit the brakes. πŸ›‘
  • 4: Authentication required β€” you gotta prove who you are first, bestie. πŸ”
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information. (fr fr, check the help if you're getting a number that isn't in this list πŸ‘€)

πŸ¦‹ SEE ALSO πŸ¦‹

  • gh-pr(1) β€” the parent command, go say hi.

and that's the page!! no cap, every flag is there, nothing skipped πŸ’œ

sign-off time: this whole thing is from GitHub CLI v2.102.0, dated Oct 2026 β€” so if you're reading this from the future, hi, hope your reverts all exit 0. πŸŒŸπŸŽ€

πŸ“¦ where this page comes from