Whether you’ve rebranded your project, refined its purpose, or simply want a clearer name, renaming a repository on GitHub is straightforward. But there are a few important steps to ensure your local and remote copies stay in sync.
In this guide, we’ll walk you through how to safely rename a GitHub repository—and update your local setup to reflect the changes.
🔐 Who Can Rename a Repository?
Only users with Admin access to a repository can rename it.
If you’re part of a GitHub organization, you must also have the appropriate permissions.
✅ Step-by-Step: Renaming a GitHub Repository
1. 🔧 Go to Your Repository Settings
- Log into GitHub.
- Navigate to the repository you want to rename.
- Click the Settings tab (top-right of the repo).
- In the Repository name section, update the name.
- Click Rename.
✅ GitHub will automatically create redirects from the old name to the new one—so old links won’t immediately break.
🧠 What Happens After Renaming?
- The repository URL changes (e.g.,
github.com/your-username/old-name
→github.com/your-username/new-name
). - Cloning or pushing using the old remote URL will still work (temporarily, thanks to GitHub’s redirects).
- For safety, it’s best to update your local Git remote URL.
🔄 Step 2: Update Your Local Git Remote (Recommended)
Open your terminal and navigate to your local repository:
cd path/to/your-local-repo
Then update the remote URL:
git remote set-url origin https://github.com/your-username/new-repo-name.git
To verify it:
git remote -v
You should see the new URL listed for origin
.
🧪 Optional: Test the Setup
Try pushing or pulling to make sure everything works:
git push
git pull
If you use GitHub Pages, CI/CD, or webhooks, check those integrations after renaming.
🧹 Bonus: Update README and Links
After renaming, be sure to:
- Update your README.md to reflect the new name.
- Fix any internal documentation or badge links.
- Let collaborators or contributors know about the change.
📌 Summary
Task | Required Action |
---|---|
Rename on GitHub | Go to Settings → Change repository name |
Update local repo | Use git remote set-url |
Verify remote | Use git remote -v |
Check integrations | Test CI/CD, webhooks, GitHub Pages |
Update documentation | README, wikis, and links |
🎯 Conclusion
Renaming a GitHub repository is a quick and simple task, but it’s important to update your local environment and notify collaborators. GitHub’s automatic redirects reduce disruption, but taking a few extra steps ensures your workflow stays smooth.