Public
Pull mirror status: ok

git

The mind's repos at git.<domain>: a git remote, and pages to read a repo and to propose a change to it in a browser. config/worker.ts mounts it and says which repos anyone may read.

git clone https://git.<domain>/repos/<name>

/                                  the repos
/repos/<name>                      the repo's files and its README
/repos/<name>/tree/main/<path>     a folder, or a file
/repos/<name>/commits              the newest commits
/repos/<name>/commit/<oid>         one commit: what it changed
/repos/<name>/branches             the branches, each with its pull or a compare link
/repos/<name>/compare/<branch>     a branch against main, and "Open a pull"
/repos/<name>/pulls                the pulls
/repos/<name>/pull/<number>        one pull: its conversation and what it changes

Git on your computer

A public repo is cloned with no sign-in. Any other repo, and every push, is for a member of the mind. Set git up once on a computer (it needs Node 22 or newer):

npx iterate git setup git.<domain>

It signs you in to the mind if this computer is not signed in (in a browser here, or with a link and a code for a browser on another device), and sets git's credential helper for this one host. After that, plain git clone, git pull and git push work, and nothing asks for a password.

  • A git that was never set up gets "there is no repo here that you can read" with that command, for a repo that is not public and for a repo that does not exist alike.
  • When the sign-in has ended (it ends after seven days without use, or when a member ends it on the mind's /sessions page), git says so and names the same command. With a person at the terminal, git signs in again by itself and then goes on.
  • Git gets a token that is for this host alone and lasts an hour at most. No Artifacts token leaves the mind: the app adds its own on the way to Artifacts.
  • In a sandbox of the mind the same command signs nobody in: git's helper there asks the mind for a token for the one repo, through the sandbox's own session, and this app passes it on. So does an agent that sends an Artifacts token of its own (itx.cfArtifacts).
  • Who pushed which refs is on the repo's log: git/pushed { by, refs }.

Propose a change

git checkout -b my-fix
git commit ...
git push origin my-fix

Then find the branch under Branches, compare it with main, and press "Open a pull". A push to a branch that is not main changes nothing that runs.

A pull is squashed into main as one commit, named <title> (#7) with the pull's body under it. The button is there while the branch has main's newest commit. When main has moved:

git merge origin/main
git push origin my-fix

A repo's pulls are events on the repo's own context: pulls.ts says which. An agent opens a pull or comments by appending the same events, and merges with itx.config.pullMerge(repo, number).

The files

  • app.ts: who may do what, and the git remote
  • pages.ts: each page, as plain HTML
  • pulls.ts: what a pull is, and the merge
  • public/: what the browser runs. There is no build.

Try a change

node tests/serve.mjs               # the app over copies of the repos cloned beside this one
node --test "tests/*.test.mjs"

A push to main is live a few seconds later.