JJ and Smartlog
Use change-oriented drafting, first-class conflicts, and operation history with Jujutsu.
The important concepts
@is the working-copy change.- A change ID stays stable while the commit content evolves.
- A commit ID identifies one immutable version of that change.
- The working copy is represented as a commit, so there is no separate staging area.
- A stack is a sequence of dependent changes that can be reviewed together.
A first local change
jj status
jj describe -m "Explain the change"
# edit files
jj diff
jj log
When the change is ready, use jj new to start the next change. Use jj edit <change> to return to an earlier change, or jj squash when a small follow-up belongs in its parent.
Inspect the graph
jj log shows the change ID, commit ID, description, and graph shape. Revsets let you select revisions precisely:
jj log -r '@'
jj log -r '::@'
jj log -r 'bookmarks()'
jj diff -r 'base..@'
Use quotes around revsets so your shell does not reinterpret operators.
Conflicts are visible work
JJ can record a conflict in a change instead of forcing you through a special “continue” mode. Inspect the conflict, edit the affected files into the intended result, and amend the change. Descendant changes can remain connected while the conflict is resolved.
Do not hide a conflict by publishing a partial result. Resolve it, rerun the relevant checks, and review the final stack.
Recover with the operation log
JJ records repository operations. If an operation has an unexpected result:
jj op log
jj op show <operation>
jj undo
Inspect the operation history before restoring anything. The operation log is for repository recovery, not a replacement for review or backups.
JJ in the web product
The repository’s Smartlog view presents draft commits, stack shape, review state, and workspace context together. Use it to orient yourself, then open the associated stack review for the human decision.
Further reading
This guide is a product-oriented adaptation of the public JJ tutorial, working-copy guide, conflict guide, and operation-log guide.