status: active
timestamp: 2026-06-20
tags: [runbook, git, submodule, rename, naming]
Rename a repo to its role-suffixed slug
Rename chirag127/oriz* repo to role-suffixed slug; update .gitmodules + submodules
Rename a repo to its role-suffixed slug
Run from the master
.chirag127/orizrepo root (/c/D/oriz). The user must authorise the push at step 8 — see
Prerequisites
ghCLI authenticated againstchirag127.- The target name follows the suffix table in
branding/repo-naming-suffixes.md(e.g.oriz-blog→oriz-blog-site). - Working tree clean in master and in the submodule.
Steps
1. Rename the repo on GitHub
gh repo rename <new-name> --repo chirag127/<old-name>
gh repo rename automatically sets up the GitHub redirect from the
old URL to the new one, so existing clones keep working — but only
after this command runs. Do not push commits to the old URL after
the rename: they’ll redirect to the new URL but the local remote
still says the old name until step 3.
2. Update .gitmodules in master
Edit /c/D/oriz/.gitmodules. Change the url line for the renamed
submodule to the new GitHub URL. Leave the path unchanged — it
stays sites/oriz-<name> (no -site suffix on the local path) per
branding/repo-naming-suffixes.md.
[submodule "sites/oriz-<name>"]
path = sites/oriz-<name>
url = https://github.com/chirag127/oriz-<name>-site.git
3. Sync the submodule’s git config
cd /c/D/oriz
git submodule sync sites/oriz-<name>
This rewrites sites/oriz-<name>/.git/config so the submodule’s
origin remote points at the new URL.
Verify:
git -C sites/oriz-<name> remote -v
# origin https://github.com/chirag127/oriz-<name>-site.git (fetch)
# origin https://github.com/chirag127/oriz-<name>-site.git (push)
4. Update package.json repository.url
Inside the submodule:
cd sites/oriz-<name>
# edit package.json — set "repository": { "type": "git", "url": "https://github.com/chirag127/oriz-<name>-site.git" }
# bump version (patch) so the rename ships in a release
pnpm version patch --no-git-tag-version
5. Update README badges
Open sites/oriz-<name>/README.md and replace any chirag127/oriz-<name>
references with chirag127/oriz-<name>-site:
- shields.io badges (CI, license, last commit)
- “Clone” / “Fork” instruction lines
- Any direct GitHub permalinks
# sanity check — should print zero hits after edit
grep -n "chirag127/oriz-<name>\b" sites/oriz-<name>/README.md
6. Commit inside the submodule
cd /c/D/oriz/sites/oriz-<name>
git add package.json README.md
git commit -m "chore(rename): repo renamed to oriz-<name>-site"
7. Bump the master pointer
Per bump-submodule-pointer.md:
cd /c/D/oriz
git add .gitmodules sites/oriz-<name>
git commit -m "chore(submodule): bump oriz-<name> after rename to -site suffix"
8. Push (user say-so required)
After the user explicitly authorises the push:
# push the submodule first
git -C sites/oriz-<name> push origin main
# then master
git push origin main
9. Update the Cloudflare Pages project (if site repo)
The Cloudflare Pages project’s GitHub link still points at the old repo name. Cloudflare auto-follows the GitHub redirect, but to keep the dashboard tidy:
- Open https://dash.cloudflare.com → Workers & Pages → the project.
- Settings → Build & deployments → Disconnect.
- Reconnect to
chirag127/oriz-<name>-site. - Verify the next deploy still hits
<name>.oriz.in.
10. Smoke test
gh repo view chirag127/oriz-<name>-site # confirms new URL resolves
gh repo view chirag127/oriz-<name> # should redirect / show new URL
Why this order
gh repo rename first establishes the GitHub redirect; if you
.gitmodules first then push, the push goes to a URL that doesn’t
exist yet. The submodule sync (step 3) rewrites only git config —
it does not touch the working tree, so it’s safe to run before the
inner-repo edits in step 4.
See also
branding/repo-naming-suffixes.md— what name to pickrules/development/repo-naming.md— the audit-before-publish rulebump-submodule-pointer.md— the underlying pointer-bump flow