Renaming a repository

You can rename a repository if you're either an organization owner or have admin permissions for the repository.

When you rename a repository, all existing information, with the exception of Project Pages URLs, is automatically redirected to the new name, including:

  • Issues
  • Wikis
  • Stars
  • Followers

In addition to redirecting web traffic, all git clone, git fetch, or git pushoperations targeting the previous location will continue to function as if made on the new location. However, to reduce confusion, we strongly recommend updating any existing local clones to point to the new repository URL. You can do this by usinggit remote on the command line:

$ git remote set-url origin new_url

For more information, see "Changing a Remote's URL".

If you plan on renaming your repository, we recommend using a custom domain for your Project Pages. Using a custom domain will ensure that your Project Pages URL isn't impacted by the repository name change.

Tip: Only members with owner privileges for an organization or admin privileges for a repository can rename a repository. For more information, see "Repository permission levels for an organization."

Warning: If you create a new repository under your account with the same name as the transferred repository, existing redirects to the transferred repository will break. Instead, use a different name for the new repository.

  1. On GitHub, navigate to the main page of the repository.

  2. Under your repository name, click Settings.

    Repository settings button

  3. Under the Repository Name heading, type the new name of your repository.

    Repository rename

  4. Click Rename. You're done!

Ask a human

Can't find what you're looking for?

Contact us