Jujutsu (jj)
Git-compatible version control system (jj-vcs/jj, CLI jj, Apache-2.0). It uses Git repositories as its
storage layer but has its own model: the working copy is a commit, every operation is logged and undoable,
conflicts are stored in commits, and descendants rebase automatically. Source summary: Jujutsu (jj).
Facts
Git-to-jj mental model
Local setup
- Installed at
/opt/homebrew/bin/jj, 0.46.0 (2026-10-20). ~/dotfilesis a colocated repo:.jj/sits next to.git/(colocated since 2026-07-02), so plain Git keeps working in that checkout.- Config stowed from the dotfiles
jjpackage:~/dotfiles/jj/.config/jj/config.tomlsets the user identity andui.diff-editor = ["nvim", "-c", "DiffEditor $left $right $output"]withdiff-instructions = false, sojj split/jj diffeditopen Neovim instead of jj’s built-in editor.hunk.nvimprovides theDiffEditorcommand. See Dotfiles Layout for the Agent Harnesses. - Decision (2026-10-20): jj is human-only, used in the main
~/dotfilescheckout for history editing. Agents use Git only (Worktree Isolation), and Claude’s settings denyBash(jj ...). Reason:agent-review,ac-run,floor-guard,session-bandand the rtk/safety hooks are all git-specific.
Gotchas
- In a colocated repo jj detaches Git
HEADat@-, soac-run’s branch check and starship’s branch segment break until you rungit switch. - By default auto-track snapshots every untracked file (the same as
git add -A). The config setssnapshot.auto-track = "none()". - Every jj command writes, even
jj st, which snapshots and imports Git refs. jj is unsafe in read-only or plan-mode agents. - Rewriting a branch that another Git worktree has checked out leaves that worktree stale.
- jj workspaces are not Git worktrees, so the harness cannot see them.
Workflows
- Rewrite Pi commits instead of reverting them.
jj rebase -b X -d main@origininstead of mergingmaininto the branch.- Quick tweak:
jj new mainplus a bookmark. - Safety net:
jj op log/jj op restore.