diff --git a/affordances/officer/core/starting-an-app.md b/affordances/officer/core/starting-an-app.md index 9f8403c..e550384 100644 --- a/affordances/officer/core/starting-an-app.md +++ b/affordances/officer/core/starting-an-app.md @@ -19,6 +19,33 @@ shell; the SSH remote is already authenticated. If SSH is being refused for a st behind a proxy that rate-limits it — `ssh://git@100.64.0.13:10023/templates/template-react.git` is the same repository over the tailnet. +### Cloning into the folder you are already in + +`git clone .` works, **and only into a genuinely empty directory**. Verified: a single file makes it +fail, and so does a single HIDDEN one — + +``` +fatal: destination path '.' already exists and is not an empty directory. +``` + +That is not an edge case here. A commander's directory holds `CLAUDE.md` and `state/`; a plugin's chat +directory holds a `CLAUDE.md` the platform wrote. Cloning into either fails. + +When the directory is not empty, fetch instead of cloning: + +```bash +git init -q . +git remote add origin git@gitea.officer.dev:templates/template-react.git +git fetch -q --depth 1 origin HEAD +git checkout -q FETCH_HEAD -- . +git reset -q +``` + +**This overwrites a file that collides, without asking.** Also verified: doing it in a directory that +already had a `CLAUDE.md` replaced it with the template's. So look at what is there first, and if one of +those files is the platform's — a commander's brief, a plugin's chat brief — move it aside and put it back, +or clone somewhere else and copy in what you need. + ## Then read its own documentation, and do step 1 The template documents itself. **`README.md` step 1 is a rename** — everything project-specific is called