cli.sgit.ai / Get started / sgit and Git: what only sgit does, what both do, and where Git is ahead

sgit and Git

sgit is not a copy of Git with encryption on top. It has Git's verbs, so a Git user is at home in an hour. But the host reads nothing, and that makes possible a set of things Git cannot do at all. This page is the map, row by row, checked against sgit-ai 0.26.0:

sgit and Git, row by row, against sgit-ai 0.26.0. Twelve things only sgit does, from a host that reads nothing to files sealed to a person. Fifteen both do, with sgit's difference. Sixteen where Git is ahead. Fourteen of those run on the client in Git too, so sgit can build them without giving up zero knowledge; one, 160-bit ids, sgit already has as an opt-in format; one, maturity, only time fixes. And six that zero knowledge rules out for good, each with a client-side substitute.
sgit and Git, row by row, against sgit-ai 0.26.0. Twelve things only sgit does, from a host that reads nothing to files sealed to a person. Fifteen both do, with sgit's difference. Sixteen where Git is ahead. Fourteen of those run on the client in Git too, so sgit can build them without giving up zero knowledge; one, 160-bit ids, sgit already has as an opt-in format; one, maturity, only time fixes. And six that zero knowledge rules out for good, each with a client-side substitute.

In one paragraph. Use sgit when the files must stay unreadable to whoever stores them, when readers should need no account, or when many agents work in one large vault, one folder each. Use Git when you need line-level merges, blame and bisect today, a forge's review and CI, or twenty years of tooling. Almost everything on Git's side runs on the client in Git too, so sgit can build it. What sgit can never do is anything that needs the host to read your files.

The evidence:

1. What only sgit does

"No equivalent" means the mainstream Git toolchain and GitHub. Add-ons such as git-crypt and git-remote-gcrypt cover parts of the first row, with the trade-offs their own READMEs state.

#What sgit doesHowGit's nearest answer
1The host reads nothing. Contents, file names, commit messages and branch names are encrypted on the client (AES-256-GCM) before they leave itevery command; objects stored under opaque idsgit-crypt encrypts contents only; its README says it "does not encrypt file names, commit messages" or other metadata
2A read key is a capability, not a permission. It is derived one way from the vault key, so it can never become write access. It reads from any static host, with no account and no server codeclone --read-key, --transport static, sgit publishread access is a role a server enforces (a collaborator, a deploy key), or the repository is public
3Custody without access. Copy a published vault you cannot read, keyless, and verify it. A backup service or a second host holds and checks the vault and learns nothingsgit vault mirror [--verify DIR]a mirror of a Git repository can read all of it
4Write without read. An append lane lets a sender put something into a vault and learn nothing, not even whether anyone else writes there: the answer is {"ok": true}the server's append lanes; no sgit command yetno Git or GitHub role can write without reading
5One folder by byte ranges from plain storage. A scoped clone of a pack vault reads the packs' directories, then only that folder's byte ranges, verifying each object by its hash. On 76,000 files: 2.8 s and 12.5 MB, against 36 s and the whole 88 MB packclone --path on a pack vault (0.26.0)Git's dumb HTTP takes whole packs; its partial clone needs a smart server that reads the content
6Indexes the writer ships, encrypted and signed. Each push carries an index pack beside its data pack, so readers plan pulls and clones without walking trees. An index is a plan, never a proof: every object is still verified by its idautomatic on pack vaults (0.26.0); pack index build | verify | statsGit's commit-graph and pack indexes are built by each reader, as local plaintext caches
7Policy carried by the vault. The format gate (min_client, features) and signatures-required live in the encrypted branch index. Every sgit client enforces them before it writes anythingsgit vault format (0.19.0)signature checks are each user's local config; a repository cannot require them of whoever clones it
8A rewind is refused by name, on every clone. A remote head that does not descend from the last one this clone accepted is refused, even though the host took the forced push (it cannot read refs)pull refuses; pull --accept-rewind takes it (0.19.0)the default + refspec takes a forced update with one line of output; receive.denyNonFastForwards is a server setting
9A secret guard at commit. A vault key in a zip under any name, a hard link to one of the clone's secrets, and .env files are refusedcommit, writenothing built in; GitHub's push protection runs on a server that reads the content
10Rotate the key that encrypts the history. Move a vault to a new key, and optionally a new serversgit vault rekey, vault movea leaked credential is revoked on the server; the content was never encrypted
11A computable cache. A hot path gets a fixed-cost read at a location only key holders can compute, so an edge function reads it in one request, without walking treessgit cache addevery read walks from a ref
12Seal a file to a person. Encrypt a file to someone's public key, then commit the sealed filesgit pki encrypt --recipientGit signs commits; it has no "encrypt this to that person"

Checked by this site against 0.26.0: rows 8 and 9, and write in section 2 (the script and its output). The other rows are from the CLI team's review of the code, and from the release notes of 0.24.0, 0.25.0 and 0.26.0.

2. What both have, and what differs

GitsgitWhat differs
packspack mode (0.24.0)sgit's packs are ciphertext on plain object storage; Git's are delta-compressed, sgit's are not
kept packs above fetch.unpackLimitclone --pack-store (0.26.0)the same idea; sgit verifies each object on every read
partial clone plus sparse-checkoutclone --path, fetch <folder> to widen, clone --sparse (0.18.0)against ciphertext on S3. A commit outside the scope is refused by name, and two scoped clones in different folders never conflict
clone --no-checkoutclone --no-checkout, then sgit checkout <paths> (0.26.0)the agent loop: pull --no-checkout, then checkout --since-pull writes only what changed
shallow clone, fetch --unshallowclone --depth N, fetch --unshallow (0.18.0)combines with --path
bare cloneclone --bare, clone-headless, clone-branch, clone-range
git commit <paths>sgit write <path> --file F [--also P:F …] [--push] [--json]whole files, committed atomically to HEAD without scanning the working copy; other edits stay uncommitted. There is no staging area and no hunk selection
signed commits and tagscommits signed by each clone's key; verification and signatures-required (0.19.0); signed tags (0.21.0)sgit's check is required by the vault (row 7). A signature proves a key holder, not a person; see section 5
log, diff, show, refloghistory log --grep --since --until --author --file --patch --stat --json, history diff A..B, history show, history refloghistory log --vault-key runs with no clone
revert, reset, commit --amendhistory revert, history reset, history undo, commit --amend (0.21.0)
stashvault stash
merge and conflictsbranch merge, resolve --show, merge-abortwhole-file: a conflicting file is written as <path>.conflict; see section 3
remoteremote add / list / set-url
fsckcheck fsck, check verifychecks encrypted objects and their signatures; can repair
reading over dumb HTTP--transport staticone file from a normal vault is a ref, a commit, one tree per folder level and the blob, as plain GETs; one batch request for a path declared with sgit cache add

The full Git-to-sgit command table is sgit for Git users.

3. Where Git is ahead, and whether sgit can close it

Git is a client-side program. Almost all of its lead runs on the client in Git too, on plaintext the client holds. sgit holds the same plaintext, so it can build the same things with no new server feature, unless the row says so. Size: S is days, M a week or two, L more, XL a design first.

Git hassgit todayHow sgit would build itSize
line-by-line three-way mergewhole-file, with <path>.conflicta diff3 merge of base, ours and theirs for text files under a size cap; conflict markers inline; whole-file stays for binariesM
rename detectionnoneexact renames from the plaintext content hash the tree entries already carry; similar renames by Git's similarity scoreS–M
a staging area, commit -psgit write for whole filescommit <paths> reuses write; -p is a hunk picker over history diff; a real index is a design decisionS / M / L
blamenonewalk the file's commits (the index pack's file → commits member makes it cheap) and diff each stepM
bisectnonestate in .sg_vault/local/, the midpoint by generation number, which pack indexes already carryS–M
grep over contenthistory log --grep over messagessgit grep over HEAD or a commit, decrypting locally; optionally an encrypted local indexS / M
delta compressioneach blob deflated, no deltasdelta against the previous version at push; the reader rebuilds and verifies by content address; a format feature and a gateL
garbage collectionnone; compaction moves old packs to archive/vault prune, driven by the client, which alone can read what is reachable, after a grace period as Git's gc.pruneExpireM
read one file with no clone, from the CLIthe browser reader does it on normal vaultssgit cat --vault-key; on pack vaults, Phase 4 of pack indexes: find the blob's offset in the index, read that rangeS / L
a command for append lanesthe server feature onlysgit inbox send, sealed with pki encrypt; inbox read drains it into a commitS–M
allowed signers, key expiry, revocationany read-key holder can mint a signing keyan owner-signed signer registry in the branch index, pinned on first use (closes threat model TM-R01)L
per-folder read accessone key per vault; a scoped clone is not a boundarya folder key wrapped to each member's public key; others see the folder as the opaque entry scoped clones already carryXL
who pushed, protected branches per personone shared write keyper-member write tokens with an ACL by ref id, which the host enforces without learning branch names; the signer registry on the clientL, server and client
review, CI, every IDEthe vault web UI decrypts in the browserreview objects in the vault; CI runners that hold the read key, woken by a ref-change webhook; a git-remote-sgit helper so Git tooling reads and writes vaultsL each
160-bit ids by defaultformat 1 is 48-bit; format 2 is 128-bit, opt-insgit vault format --set 2 (0.19.0)shipped, opt-in
twenty years of maturityfour weeks of ten releasestime

4. What zero knowledge rules out

These are limits of the model, not of effort. Each has a substitute on the client.

Ruled outWhyThe substitute
anything the host must read to do: server-side search, diffs, a merge button, code scanning, language statisticsthe host holds ciphertext; giving it the key ends zero knowledgedo it in the client, the browser, or a runner the key holder controls
taking back what a reader already hasno system can; a removed GitHub collaborator keeps their clone toorotate forward (vault rekey, vault move), delete the old vault; per-folder keys limit what each reader ever got
per-folder permissions inside one keythe host cannot tell folders apart, and the key decrypts every objectper-folder keys (section 3)
hiding all metadatasizes, timing, counts and access patterns are visible to any storepadding, fixed-size packs and decoy reads reduce it at a bandwidth cost; only an ORAM-style protocol removes it
the host optimising the store: repacking, deltas, dedupe across vaultsthe host has only ciphertext; dedupe across vaults would need convergent encryption, which leaks equalityclient-side deltas and prune (section 3)
a host that enforces fast-forward-onlythe host cannot read a ref, so it cannot check ancestrythe client-side rewind guard (row 8), shipped

5. The qualifiers

Said plainly, so that nobody builds on a stronger claim than the code makes:

Sources: the CLI team's review of the newsroom's article, written against SGit-AI__CLI at 640069a; sgit-ai 0.26.0 from PyPI and its command reference; the check script, run on 28 October 2026; git-crypt's README; Git's documentation on git-clone and git-config. Where this page and the code disagree, the code wins and this page is wrong: say so on GitHub.

This page as markdown · its source, admin/content/docs/sgit-and-git.md