GH-REPO-RENAME(1)

πŸ’… gh-repo-rename (1) β€” the GitHub CLI manual, bestie edition

okay so real talk, this is gh-repo-rename from the GitHub CLI manual, and it's literally the glow-up command for your repo's name. ✨


🌸 NAME 🌸

gh-repo-rename β€” rename a repository. that's it. that's the whole vibe. πŸ’–


πŸŽ€ SYNOPSIS πŸŽ€

gh repo rename [<new-name>] [flags]

πŸ¦‹ DESCRIPTION πŸ¦‹

So like, you know when your repo has a name that's giving absolutely nothing and you just need a rebrand? same bestie. This command renames a GitHub repository. iconic behavior honestly.

Now, <new-name>? that's the name you want, and here's the tea β€” it's without the owner. so don't be out here typing the whole owner/name situation, just the name part, okay? 🫢

By default, the command renames the current repository β€” like, the one you're standing in, main character energy. Otherwise, the repository you specified with --repo gets renamed instead. you're in control, periodt. πŸ‘‘

⚠️ okay important one: to transfer repository ownership to another user account or organization, you must follow additional steps on github.com. this command is not gonna do that for you, no cap. πŸ™ˆ

for more info on transferring repository ownership, see:

⟨https://docs.github.com/en/repositories/creating-and-managing-repositories/transferring-a-repository⟩


✨ OPTIONS ✨

  • -R, --repo <[HOST/]OWNER/REPO> β€” pick a different repository using the [HOST/]OWNER/REPO format. like, "not this one, that one" πŸ’…
  • -y, --yes β€” skip the confirmation prompt. living dangerously, skipping the "are you sure" moment, we love a decisive queen πŸŽ€

πŸ’€ EXIT CODES πŸ’€

know these by heart, bestie, iykyk:

  • 0 β€” successful execution 🌈 slay
  • 1 β€” error 😭
  • 2 β€” command canceled 🫠
  • 4 β€” authentication required πŸ” (go log in babes)
NOTE: specific commands may have additional exit codes. refer to the command's help for more information. πŸ‘€

πŸ”₯ EXAMPLE πŸ”₯

# Rename the current repository (foo/bar -> foo/baz)
$ gh repo rename baz

# Rename the specified repository (qux/quux -> qux/baz)
$ gh repo rename -R qux/quux baz

see? foo/bar β†’ foo/baz, and qux/quux β†’ qux/baz. little rebrands, big impact. ✨


πŸ‘‘ SEE ALSO πŸ‘‘

  • gh-repo(1) β€” go read that one too, it's the whole family 🧚

kisses and commits, bestie β€” this page came to you from GitHub CLI v2.102.0, dated Oct 2026. you're welcome πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from