Coming from git

Coming from git

Most git verbs have a loot verb with the same name or a near one. Three habits do not carry over.

The vocabulary map

gitloot
commitchange, signed when you run loot new
commit hashversion id (hex), which moves on every rewrite, plus a change id (letters k to z), which does not
working tree and indexthe working change; there is no index
git add, git rmnothing: edits and deletions are captured for you
git commit -mloot new -m, or loot describe -m then loot new
git commit --amendloot describe -m before you finalize; loot edit <change-id> after, to change its content or message
HEADHEAD is the last signed change; @ is the working change
git reflogloot op log, loot undo, loot op restore <n>
git rebaseloot move, squash, split; nothing is deleted
git mergeloot merge <head> for one head, loot converge for all
branchnone; loot heads lists the live lines
git worktreea lane, loot lane new
git tagloot tag, a signed landmark; retiring one deletes nothing
remotea relay, for clone, fetch, pull and push
.gitignore.lootignore, with no ! negation
.gitattributes.lootattributes, which declares visibility
pre-commit, pre-push hooksa finalize or push line in the untracked .loot/gates

status, log, show, diff, restore, cherry-pick, revert, blame, bisect, grep, clean, gc and format-patch keep their git names. Bare loot diff lists changed paths; --content prints the unified diff.

1. There is no staging area

The working tree is the working change. Every verb that changes the repo captures the tree first; read-only verbs such as status and log never do. A new file is part of the change as soon as it exists, and deleting a file records the deletion. To keep a file out, list it in .lootignore. To finalize only part of your work, use loot split, with -p to choose hunks.

$ printf 'hello\n' > README.md
$ loot status
working change zqzzpovv  32ec7308  "(working change)"
  +  README.md              internal
$ loot describe -m "first draft"
described working change cbf2b51f as "first draft"
$ loot new
finalized working change cbf2b51f; started fresh change lpxptlvu
first-seal summary (1 new path):
  internal  README.md
loot: signed cbf2b51f (1 path) directly on the working tree (no lane). `loot undo` steps this back.

2. Committing is two acts, and the hash moves

loot describe -m names the working change, as often as you like. loot new signs it and starts the next one. It refuses a change with no description, and only signed changes travel. Above, the version id changed when you described the change, because it hashes the message, while the change id zqzzpovv stayed put: hold on to the change id. Because history is signed, loot undo moves your view back without deleting any change, and it will not step back past a push.

3. The repository is not the access boundary

A git clone reads every file. A loot clone without a path's key holds only its ciphertext, so a .env can live in the shared repo instead of in .gitignore. See Keep a file private in a shared repo.

That makes git a projection, not the source. loot ferry writes each finalized change as one git commit carrying Loot-* trailers, and takes commits made on git main back in. Bind it once with loot ferry --git-dir <path>; a bare repo is simplest, because when main is checked out there, ferry leaves it to git and updates only refs/loot/*. Only Internal and Published content is projected: Restricted and Embargoed paths are left out, names included. Trust that git remote with everything Internal.

Against the git mirror, Restricted is enforced by omission, not by keys, and loot burn cannot reach a blob already in git. See the trust matrix and known issues.