KIT

Git command parity

Which Git commands kit matches, where it differs, and what it leaves out.

kit matches the behavior of the Git command line. It does not share a storage format or a wire protocol with Git. kit uses BLAKE3 object IDs and signs every commit. A kit repository is not a .git repository.

The scope, the machine-output contract and the documented differences are in docs/PARITY.md.

parity
Matches Git for the flags in scope.
divergent
Works, with the differences in the note.
non-goal
kit does not support it, by design.

Everyday

Stage, commit, inspect and undo changes.

divergent:

init Creates .kit/ instead of .git/. It takes no argument and no flag. In an existing repository it fails, where Git reinitializes.

divergent:

add Pathspecs, -A, -u, -f and -p (interactive hunk staging). -n and --dry-run are not implemented.

divergent:

status --porcelain (v1 and v2), -s and -z match Git, with 64-hex IDs. A path with special bytes is quoted as in Git. kit lists each untracked file. Git lists an untracked directory as dir/.

divergent:

diff --staged, --cached, --name-only, --name-status, --stat, -w, -b, -U<n>, -z, --exit-code, --quiet, --color and ranges. Without a revision, kit compares HEAD with the working tree, with staged and untracked files. Git compares the index with the working tree.

divergent:

commit -m, -F, -a, --amend, --author and -q. Every commit is signed. --author takes a key identity such as ed25519:<hex>. kit makes a commit when nothing changed. Git refuses without --allow-empty, which kit does not have.

parity:

rm --cached, -r and -f. Refuses to delete a modified file without -f.

parity:

mv Moves a file or a directory, also into a directory. -f overwrites the destination. status and diff show a move as R.

divergent:

checkout / switch checkout -b and -B, switch -c and -C create a branch. Both refuse to overwrite modified files. checkout takes a branch or a revision, not a path. Use restore for files.

divergent:

restore / reset restore: --staged, --worktree, --source. reset: --soft, --mixed, --hard. restore and reset --hard refuse to discard edits without -f, where Git discards them. reset --mixed does not list the unstaged changes.

Branches, tags and merging

Create branches and tags, then join history.

divergent:

branch Create, list, -v, --show-current, -d, -D, -m, --merged, --contains and name patterns. -r, -a, -u and --unset-upstream are not implemented.

divergent:

tag Lightweight, -a, -s, -m, -d and -l <pattern>. The list shows the name, the short ID and the kind. Git shows the names.

divergent:

merge --no-commit, -m, --continue and --abort. The messages match Git. Conflict markers read ours and theirs. Git writes HEAD and the branch name.

parity:

cherry-pick -n, -m, --continue and --abort.

divergent:

rebase <branch>, --continue, --abort, --skip and -i with reorder, drop, reword, squash and fixup. --onto and the edit action are not implemented.

divergent:

revert <commit>, -n, --continue and --abort. kit does not revert a merge commit and has no -m.

History and inspection

Read what happened and find when it changed.

divergent:

log Ranges, -n, --oneline, --abbrev-commit, --abbrev, --format=json, --author, --grep, --since, --until, --no-merges and --first-parent. --author and --grep match a substring. --since and --until read a fixed set of date forms. -p, --stat, --decorate, --all and --graph are not implemented. The header shows a key identity and a UTC date.

divergent:

show Commits, tags and blobs, and --stat. <rev>:<path> and -s are not supported.

divergent:

reflog Lists the first-parent chain of a branch as <ref>@{N}. It does not record operations, and it omits commits that amend or reset replaced.

divergent:

blame -L, a revision, -w, -M, -C, --ignore-rev, --reverse, --porcelain and --line-porcelain. The default line is <short id>, <line number>, <text>. The porcelain author fields hold a key identity, and there is no previous line. --ignore-rev-precise is only in kit.

divergent:

bisect start, good, bad, skip, reset and run <cmd>. kit prints each candidate and does not check it out. HEAD stays on your branch. Git checks out each candidate.

Workspace

Linked worktrees, partial checkouts and stashed changes.

divergent:

worktree add, list, remove and prune. All trees share one object store and the refs. A branch is in at most one tree. remove refuses a tree with changes or untracked files without --force. move, lock and repair do not exist.

divergent:

sparse-checkout set, list, disable and reapply. set keeps files already in the working tree. reapply does not create a file that a pattern excludes, and status lists that file as deleted.

divergent:

stash save, list, pop, apply, drop, clear and show, with --index. Each linked worktree has its own stash. Git shares one stash. push and --include-untracked are not implemented.

Cleanup and maintenance

Remove untracked files and reclaim object storage.

parity:

clean -n, -f, -d, -x and -X. Refuses to run without -f.

divergent:

gc Prunes unreachable objects after a grace period. -n previews and --grace-secs sets the period. Git gc has no -n.

Plumbing

Low-level commands for scripts and tools.

divergent:

rev-parse --short, --abbrev-ref and --show-toplevel. --verify and <rev>:<path> are not supported.

parity:

cat-file -t, -s, -p and --batch. A missing object prints <name> missing.

parity:

ls-files / ls-tree ls-files: -s, -z, --others, --ignored and --exclude-standard. ls-tree: -r. The output matches Git except for the ID length.

divergent:

show-ref --heads and --tags. A ref pattern argument is not supported.

parity:

for-each-ref --format with %(atom) fields and a ref pattern.

divergent:

symbolic-ref / update-ref symbolic-ref reads or repoints HEAD. update-ref takes an old value for compare-and-swap. update-ref -d refuses to delete the current branch. Git deletes it.

parity:

merge-base <a> <b> prints the common ancestor. --is-ancestor sets the exit code.

divergent:

rev-list Takes one revision. --count prints the number. Ranges and --max-count are not supported.

Remotes

Sync over the kit transports.

divergent:

remote List, -v, add, remove, rename, get-url and set-url. A URL starts with kit+<scheme>://. A plain URL or path is an error. The default remote is named default, not origin.

divergent:

push Pushes the current branch, or all branches with --all. -u, --force-with-lease, -f and --dry-run work. The summary has the shape of Git. kit has no refspec, --tags or --delete.

divergent:

pull / fetch The summary has the shape of Git. --all covers every remote. pull fast-forwards only. --rebase, --no-ff, --prune and --tags are not implemented.

divergent:

clone -b <branch> and -o <name>. --depth fails with a usage error.

non-goal:

on-disk and wire interop with .git A BLAKE3 object store cannot share bytes with a SHA-1 object store. kit translates objects with kit git export and kit git import. Two-way sync is not planned.

Config and conventions

Settings and ignore rules.

divergent:

config Reads and writes a fixed set of keys, with --unset, --local and --global. -c sets a key for one command. user.name, user.email and core.* are unknown keys and fail. A repository cannot hold the signing key.

divergent:

ignore files Reads .gitignore and .kitignore at the repository root. Negation works. add -f stages an ignored path. kit does not read ignore files in subdirectories.

Format differences

Permanent differences in object IDs and repository layout.

Hash length. A kit object ID has 64 hex characters (BLAKE3). A Git object ID has 40 (SHA-1). A Git hash never resolves in kit. A short prefix of a kit ID resolves.
Repository directory. kit keeps its state in .kit/, not .git/. kit does not detect a repository by .git/.

Safety differences

Places where kit refuses a default of Git to protect local edits, rewritten commits and the signing key.

Discarding edits needs -f. restore and reset --hard refuse to discard local edits or staged content without -f. Git discards them without a warning.
The signing key stays out of the repository. Repository config cannot hold the signing key, and -c ignores it. A cloned repository cannot redirect signing.
Rewrites stay recoverable. commit --amend, reset and rebase record the replaced commit in a recovery log. gc keeps it for the grace period.
The current branch stays. update-ref -d refuses to delete the current branch. Git deletes it.

Out of scope

Git features that kit does not support, by design.

  • Submodules and subtrees
  • Hooks, including core.hooksPath
  • The full refspec grammar
  • Git wire protocol v2 and smart-HTTP negotiation
  • git notes
  • Shallow clone
  • .git on-disk interop and SHA-1 objects
  • Shadowing the git binary on PATH