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:
β¨ OPTIONS β¨
-R,--repo<[HOST/]OWNER/REPO> β pick a different repository using the[HOST/]OWNER/REPOformat. 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 π slay1β 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
- 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