The whole system on one page
The left side shows jj's layers, from the command line down to the files under .jj/.
The right side shows the data model those layers store, with each arrow labelled by the field that
links one object to the next. Every box links to the page that explains it, or to its source until
that page exists.
The dashed arrow shows that the repo layer's View wraps and edits the stored view.
Persistence follows the store names: the Backend (through Store) holds
commits, trees and file contents; the OpStore holds operations and views; the
OpHeadsStore records which operations are current heads; the IndexStore
keeps a commit-graph index per operation; and the WorkingCopy records what's checked
out on disk.
Architecture
-
How a command runs
The lifecycle every command shares: dispatch, loading the workspace, snapshotting, transactions, and publishing the operation.
-
On-disk layout
What lives where under .jj/, which component owns each path, and in what format.
-
Commits and change IDs
The Commit object field by field, content-addressed commit IDs versus stable change IDs, and how commits are built and signed.
-
Trees, files and copies
Tree objects, the TreeValue variants, merged trees and tree diffs, and copy tracking.
-
First-class conflicts
Merge<T>, the alternating add/remove representation behind conflicted trees, refs and files.
-
The operation log
Operations, their metadata, op heads, and how concurrent operations are detected and merged.
-
Views, bookmarks and tags
The View each operation points at: heads, bookmarks, tags, remotes, Git refs and working-copy commits.
-
Repos, transactions and rewriting
ReadonlyRepo, MutableRepo and Transaction, and how rewrites propagate to descendants.
-
The working copy
Snapshot and checkout, the tree state file, file states, and stale working copies.
-
The commit index
Index segments, the change-ID index, the changed-path index, and short ID prefixes.
-
Revset engine
From revset text to evaluated commits: grammar, expression tree, symbol resolution and evaluation.
-
Storage backends
The Backend trait, the Store caching layer, and the Git and simple backends.
-
Every schema
All seven .proto files, every message, enum and field, and the Rust types they map to.
Commands
Every jj command and subcommand, traced from the CLI down into the core. The list comes from jj's own command definitions, and each summary is the command's own help text. Linked commands have a full page; the rest are still being written.
Creating and editing changes
-
jj newCreate a new, empty change and (by default) edit it in the working copy -
jj editSets the specified revision as the working-copy revision -
jj describeUpdate the change description or other metadata [default alias: desc] -
jj commitUpdate the description and create a new change on top [default alias: ci] -
jj metaeditModify the metadata of a revision without changing its content -
jj nextMove the working-copy commit to the child revision -
jj prevChange the working copy revision relative to the parent revision
Moving and combining changes
-
jj rebaseMove revisions to different parent(s) -
jj squashMove changes from a revision into another revision -
jj splitSplit a revision in two -
jj absorbMove changes from a revision into the stack of mutable revisions -
jj duplicateCreate new changes with the same content as existing ones -
jj abandonAbandon a revision -
jj parallelizeParallelize revisions by making them siblings -
jj simplify-parentsSimplify parent edges for the specified revision(s). -
jj arrangeInteractively arrange the commit graph. -
jj convergeConverge divergent changes -
jj revertApply the reverse of the given revision(s) -
jj restoreRestore paths from another revision -
jj diffeditTouch up the content changes in a revision with a diff editor
Content and conflicts
-
jj fixUpdate files with formatting fixes or other changes -
jj runRun a command across a set of revisions. -
jj resolveResolve conflicted files with an external merge tool -
jj file annotateShow the source change for each line of the target file. -
jj file chmodSets or removes the executable bit for paths in the repo -
jj file deleteDelete files from the given revision -
jj file editEdit the contents of a file in a revision -
jj file listList files in a revision -
jj file searchSearch for content in files -
jj file showPrint contents of files in a revision -
jj file trackStart tracking specified paths in the working copy -
jj file untrackStop tracking specified paths in the working copy -
jj sparse editStart an editor to update the patterns that are present in the working copy -
jj sparse listList the patterns that are currently present in the working copy -
jj sparse resetReset the patterns to include all files in the working copy -
jj sparse setUpdate the patterns that are present in the working copy
Inspecting history
-
jj logShow revision history -
jj showShow revision metadata and diff -
jj diffCompare file contents between two revisions -
jj interdiffShow differences between the diffs of two revisions -
jj statusShow high-level repo status [default alias: st] -
jj evologShow how a change has evolved over time -
jj rootShow the current workspace root directory (shortcut for `jj workspace root`) -
jj bisect runRun a given command to find the first bad revision
Operation log
-
jj undoUndo the last operation -
jj redoRedo the most recently undone operation -
jj operation abandonAbandon operation history -
jj operation diffCompare changes to the repository between two operations -
jj operation integrateMake an operation part of the operation log -
jj operation logShow the operation log -
jj operation restoreCreate a new operation that restores the repo to an earlier state -
jj operation revertCreate a new operation that reverts an earlier operation -
jj operation showShow changes to the repository in an operation
Bookmarks and tags
-
jj bookmark advanceAdvance the closest bookmarks to a target revision -
jj bookmark createCreate a new bookmark -
jj bookmark deleteDelete an existing bookmark and propagate the deletion to remotes on the next push -
jj bookmark forgetForget a bookmark without marking it as a deletion to be pushed -
jj bookmark listList bookmarks and their targets -
jj bookmark moveMove existing bookmarks to target revision -
jj bookmark renameRename `old` bookmark name to `new` bookmark name -
jj bookmark setCreate a new bookmark, or update an existing one by name -
jj bookmark trackStart tracking given remote bookmarks -
jj bookmark untrackStop tracking given remote bookmarks -
jj tag deleteDelete existing tags -
jj tag listList tags and their targets -
jj tag setCreate or update tags -
jj tag trackStart tracking given remote tags -
jj tag untrackStop tracking given remote tags
Git and remotes
-
jj git cloneCreate a new repo backed by a clone of a Git repo -
jj git colocationManage Jujutsu repository colocation with Git -
jj git exportUpdate the underlying Git repo with changes made in the repo -
jj git fetchFetch from a Git remote -
jj git importUpdate repo with changes made in the underlying Git repo -
jj git initCreate a new Git backed repo. -
jj git pushPush to a Git remote -
jj git remoteManage Git remotes -
jj git rootShow the underlying Git directory of a repository using the Git backend -
jj gerrit uploadUpload changes to Gerrit for code review, or update existing changes
Workspaces
-
jj workspace addAdd a workspace -
jj workspace forgetStop tracking a workspace's working-copy commit in the repo -
jj workspace listList workspaces -
jj workspace removeRemove a workspace and its working-copy files from disk -
jj workspace renameRenames the current workspace -
jj workspace rootShow the workspace root directory -
jj workspace update-staleUpdate a workspace that has become stale
Signing
Configuration
-
jj config editStart an editor on a jj config file. -
jj config gcFind and optionally delete repo and workspace config directories whose paths no longer exist. -
jj config getGet the value of a given config option. -
jj config listList variables set in config files, along with their values. -
jj config pathPrint the paths to the config files -
jj config setUpdate a config file to set the given option to a given value. -
jj config unsetUpdate a config file to unset the given option.
Utilities and internals
-
jj helpPrint this message or the help of the given subcommand(s) -
jj versionDisplay version information -
jj util backendCommands relating to the backend used in the current repo -
jj util completionPrint a command-line-completion script -
jj util config-schemaPrint the JSON schema for the jj TOML config format. -
jj util diffCompare two files on disk -
jj util execExecute an external command via jj -
jj util gcRun backend-dependent garbage collection. -
jj util install-man-pagesInstall Jujutsu's manpages to the provided path -
jj util markdown-helpPrint the CLI help for all subcommands in Markdown -
jj util snapshotSnapshot the working copy if needed -
jj debugLow-level commands not intended for users -
jj benchCommands for benchmarking internal operations