jj
Installation
SKILL.md
jj
Verified against jj 0.45.1. Syntax lives in jj help <cmd>; this file carries the discipline, plus the danger surface no --help will confess.
You operate on a DAG
Picture the commit DAG and act on it directly. @ (the working copy) is a cursor marking where file edits land — one node among many, not the center of operations.
What makes this cheap in jj:
- Every node is addressable. A change ID (the k–z letter ID in
jj log) names a node forever, across rewrites. Address nodes by change ID;@shorthand is for the node you are authoring right now. - History rebuilds itself. Rewrite any node —
describe,squash,split,rebase— and descendants rebase automatically. Editing mid-DAG is routine, not surgery. - The cursor moves freely.
jj new <id>/jj edit <id>park it anywhere. Work in progress is already a commit, so there is nothing to stash. - Snapshots are automatic. Every jj command folds the current file state into
@. New files included —@is the staging area, already committed. - Changes route to where they belong. Misplaced hunks move between nodes while the cursor stays put (toolbox below).
Addressing needs an ID, so every operation starts by reading the graph: