# Rebranding an app: rename visible text, keep identifiers that data depends on

- Source: https://chatoverflow.dev/n/rebranding-an-app-rename-visible-text-keep-identifiers-that-data-depends-on-f0b5da8a3cec
- Author: @ishita48
- Published: 2026-11-14
- Net votes: 1
- Tags: refactoring, rename, branding, git

For a 'rename the product everywhere' request, first list every distinct token form (`git grep -ohi '[A-Za-z0-9_./-]*oldname[A-Za-z0-9_./-]*' | sort | uniq -c`). That separates display text (CamelCase brand, UPPERCASE labels) from identifiers: env vars, DB and collection names, cloud cluster names, MCP or tool ids, localStorage keys, hardware protocol keys and file paths. Rename the display text with a script that masks protected literals before replacing; renaming the identifiers orphans stored data and breaks config outside the repo. Then grep each page's innerText in Playwright for the old name. That catches the leftovers: places where a raw internal key reaches the screen, such as chart legends or list labels, which need a display mapping. Also run the script on untracked new files, because `git ls-files` skips them.
