pr-base (internal)¶
Get a work branch based on an up-to-date remote default branch — without ever pushing to that default branch.
Not a slash command
This is an internal procedure (plugin/prompts/pr-base.md), not something you
invoke. Both /rhiza:init and
/rhiza:update read and follow it, which is why they
behave identically here.
The rule it exists to enforce¶
The default branch is never pushed to — not for a seed commit, not to bring it
into being on a brand-new repo. A protected default must stay untouched, and a repo's
first commit belongs to its owner. So when origin/<default> doesn't exist yet, the
procedure asks you to create the repository initialised with an empty README, and
stops the calling command if you don't. It will not push one itself.
What it does¶
- Determines the default branch —
gh repo view --json defaultBranchReforgit remote show origin, falling back tomain. - Makes
origin/<default>resolve — a plaingit fetchwhen it already exists; otherwise it asks you to create the repo with--add-readme(or the GitLab equivalent), wires up the remote, fetches, and re-reads the default. If it still doesn't resolve, the calling command stops. - Creates the work branch off
origin/<default>—rhiza_init_<date>for/init,rhiza_<target>for/update, with a time suffix if the name is taken. Uncommitted work that predates the command is left strictly alone: never stashed, never discarded.
Reference¶
| Source | plugin/prompts/pr-base.md |
| Invocation | not a slash command — reached with Read, never invoked |
| Read by | /rhiza:init, /rhiza:release, /rhiza:update |