← Archive

GitHub CLI Cheatsheet

7 Aug 2026 · 1 min read · Cheatsheet

  • GitHub
  • CLI

Commands for renaming a GitHub repository with the GitHub CLI and updating the local remote.

# Rename a GitHub Repository
gh repo rename <new-repo-name>
 
# After renaming GitHub automatically redirects the old repository URL, but you should update your local remote:
 
# If you want to rename a specific repo:
gh repo rename devkit --repo username/old-repo-name