Skip to content
zit Artifact [8bce415013]
Login

Artifact [8bce415013]

Artifact 8bce415013fb1b75803de5140d7004388e3d508b7a4240969adb71f856006605:

Instance of technote [d1b703df59] - A mirror the repository knows about by dmestas on 2026-09-28 17:21:25.
C A\smirror\sthe\srepository\sknows\sabout
D 2026-09-28T17:21:25.117
E 2026-09-28T17:21:25 d1b703df598c9ac5ca6beddabdb3680409e5119b
N text/x-markdown
U dmestas
W 1553
# A mirror the repository knows about

Keeping a GitHub copy of a zit repository used to mean a script and a timer:
clone, pull, `zit export-git`, `git push`, on a schedule, somewhere only its
author could see. 0.3.34 makes the mirror a property of the repository, the
way Fossil does it.

```
zit git export ../mirror --autopush [email protected]:someone/project.git
```

exports every check-in into a Git repository at `../mirror`, pushes the main
branch to `main` on GitHub, and remembers both. After that a bare
`zit git export`, from a hook, a cron job, or a forge running against a bare
store, does the whole round trip, and `zit git status` says where the mirror
is and whether it is current. The push is fast-forward only, so a mirror
never overwrites or deletes anything on the remote.

The part a script never got right was identity. A Git host decides whose
commit it is from the email address, and a zit login need not be anyone's
username there, so every mirrored commit used to land as an unknown
`[email protected]`. Each user in the repository now has a contact, as in
Fossil, set with `zit users contact LOGIN INFO`, and the export takes the
address from it.

The URL is stored in the repository's config, so zit refuses one that carries
a password. Credentials belong to Git: a credential helper, or an SSH remote.

The release also brings `landing accept --expect-target`, which lets a forge
refuse an accept once the target it tested against has moved, and an fsync
that makes a successful `pack` or `shun --force` survive a power cut.

Z 37bf2393cd4d3ea2fe33621d183e305b