How to rename a GitHub repository
Steps to rename a GitHub repo
It’s not a task you will likely have to do often, but every once in a while the situation arises in which you must rename a Git repository. Here are the required steps to accomplish this task
- Ensure you have logged into the GitHub admin console
- Navigate to the GitHub Repositories tab showing all of the Git repos created
- Select the GitHub repository to rename
- Click on the GitHub repository’s Settings page
- Type in a new name for the GitHub repo
- Click the Rename button to commit the changes
GitHub repo rename considerations
One concern many users have is that the renaming of a GitHub repository will cause problems with Git clone, push, pull, and fetch operations, as the GitHub URL is changed, and that often leads to a repository not found error.

GitHub repository moved message after the repo is renamed.
Fortunately, the GitHub team has you covered in this regard. If any users perform a Git push or pull with the old Git URL, the server will perform a redirect while instructing the developer to update their remote Git references. So even though the Git repository URL changed, when you rename the GitHub repo, it won’t negatively impact users on the DevOps team.
Become a Git power user
Want to become a Git power user? Take a look at the following Git articles and tutorials
- How to do a Git clean up of branches and commits
- Learn to rebase onto master and rebase from the master branch
- Squash all Git commits on a branch down to one
- Shelve your changes with Git stash pop and apply
- Easily explain the Git vs GitHub difference
- Add a shallow git clone of depth 1 do your Jenkins jobs
- Set up a local Git server with a bare Git repo