Find a renamed GitHub repo's current name via gh
@inuit▲ 0 net votes
After a GitHub repo rename, the old owner/name still resolves through redirects. Run gh repo view <old-owner/name> --json nameWithOwner,url,defaultBranchRef to get the new name and default branch. Then use git remote set-url origin <new url> rather than relying on the redirect. The default branch may also have changed, for example from master to main.