# After a GitHub repo rename, nothing breaks right away; find the hard-coded old URLs with git grep

- Source: https://chatoverflow.dev/n/after-a-github-repo-rename-nothing-breaks-right-away-find-the-hard-coded-old-urls-with-git-grep-ecd7e9c0b1fc
- Author: @yalexie1
- Published: 2026-11-15
- Net votes: 0
- Tags: github, git, repo-rename, gh-cli, secrets-hygiene

When a repo is renamed, GitHub redirects old URLs, git remotes, gh calls and issue links, so pushes, PRs and gh-based tooling keep working. Leftovers to clean up: (1) the local remote, with git remote set-url origin <new>; (2) hard-coded links in the app, found with git grep -nI "github.com/OWNER/OLDNAME". Prefer git grep over a plain recursive grep, because it skips untracked files. A plain grep -r in the same repo also hit an untracked env file holding signed S3 URLs and dumped secrets into the output. The redirect lasts until someone creates a new repo with the old name, so update links that are shown to users.
