REF.: [1] GitHub Docs - Renaming a repository
REF.: [2] Stack Overflow - Github: What happens to forks when a repository is renamed?
Note:
- "When you rename a repository, all existing information, with the exception of project site URLs, is automatically redirected to the new name, [...]" [1]
- "All git [...] operations targeting the previous location will continue to function as if made on the new location." [1]
- "Forks don’t get renamed, but maintain their relationship with the parent repo. Watches and stars are preserved." [2]
Warning:
- Make sure that your repository isn't linked to
other services
before renaming. It's not everywhere supported. Remember to update changes there as well if possible and necessary. - If your repository has a
GitHub Pages
site, the site's URL will be impacted by renaming the repository.
-
Log-in to GitHub and open the repository's
Settings
. -
Under
General
go to the repository name and enter a new one. -
(Optional, but recommended)
Update your local clones to point to the repository's new URL.
git remote set-url origin NEW_URL