GH-REPO-RENAME(1) GitHub CLI manual GH-REPO-RENAME(1)

# [NAME](#NAME)

gh-repo-rename - Rename a repository

# [SYNOPSIS](#SYNOPSIS)

**gh repo rename \[&lt;new-name&gt;] \[flags]**

# [DESCRIPTION](#DESCRIPTION)

Rename a GitHub repository.

**&lt;new-name&gt;** is the desired repository name without the owner.

By default, the current repository is renamed. Otherwise, the repository specified with **--repo** is renamed.

To transfer repository ownership to another user account or organization, you must follow additional steps on **github.com**.

For more information on transferring repository ownership, see:

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

# [OPTIONS](#OPTIONS)

[**-R**, **--repo** **&lt;\[HOST/\]OWNER/REPO&gt;**](#R)

Select another repository using the \[HOST/]OWNER/REPO format

[**-y**, **--yes**](#y)

Skip the confirmation prompt

# [EXIT CODES](#EXIT_CODES)

0: Successful execution

1: Error

2: Command canceled

4: Authentication required

NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.

# [EXAMPLE](#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 ALSO](#SEE_ALSO)

[**gh-repo(1)**](/man/os/gh/gh-repo.1)

Sep 2026

---

Document: gh-repo-rename(1) from gh 2.102.0-r0 (Chainguard OS)
Source: https://github.com/cli/cli
