Expert guidance for using JJ (Jujutsu) version control system. Use when working with JJ, whatever the subject. Operations, revsets, templates, debugging change evolution, etc. Covers JJ commands, template system, evolog, operations log, and interoperability with git remotes.
90
88%
Does it follow best practices?
Impact
90%
1.26xAverage score across 3 eval scenarios
Passed
No known issues
jj undo goes further back, jj redo reverses).jj and .git (since v0.34)jj log -r <revset> [-p] # View history (--patch/-p: include diffs, --count: just count)
jj log -r <revset> -G # -G is short for --no-graph
jj show -r <rev> # Show revision details (description + diff)
jj evolog -r <rev> [-p] # View a revision's evolution
jj new [-A] <base> # Create revision and edit it (-A: insert between <base> and its children rather than just on top of base)
jj new --no-edit <base> # Create without switching
jj edit <rev> # Switch to editing revision
jj desc -r <rev> -m "text" # Set description
jj metaedit -r <rev> -m "text" # Modify metadata (author, timestamps, description)
jj diff # Changes in @
jj diff -r <revset> # Changes in revset (need to be contiguous)
jj diff -f <rev1> -t <rev2> # Differences between two states
jj file show -r <rev> <fileset> # Show file contents at revision (without switching)
jj file show -r <rev> **/*.md -T '"=== " ++ path ++ " ===\n"' # Multiple files with path headers
jj restore <fileset> # Discard changes to files
jj restore --from <commit-id> <fileset> # Restore from another revision/commit
jj split -r <rev> <paths> -m "text" # Split into two revisions
jj absorb # Auto-squash changes into ancestor commits
jj rebase -s <src> -o <dest> # Rebase with descendants onto <dest>
jj rebase -r <rev> -o <dest> # Rebase single revision onto <dest>
# NOTE: -d/--destination is deprecated, use -o/--onto instead
jj file annotate <path> # Blame: who changed each line
jj bisect run -- <cmd> # Binary search for bug-introducing commitjj undo # Undo last operation (progressive - repeat to go further back)
jj redo # Redo undone operation
jj sign -r <rev> # Cryptographically sign commit
jj unsign -r <rev> # Remove signature
jj revert -r <rev> # Create commit that reverts changes (replaces old jj backout)
jj tag set <name> -r <rev> # Create/update local tag
jj tag delete <name> # Delete local tag
jj git colocation enable # Convert to colocated repo
jj git colocation disable # Convert to non-colocated@, @-, @-- # Working copy, parent(s), grandparent(s)
::@ # Ancestors
@:: # Descendants
mine() # Your changes
conflicted() # Has conflicts (renamed from conflict() in v0.33)
visible() # Visible revisions (built-in alias)
hidden() # Hidden revisions (built-in alias)
description(substring-i:"text") # Match description (partial, case-insensitive)
subject(substring:"text") # Match first line only
signed() # Cryptographically signed commits
A | B, A & B, A ~ B # Union, intersection, difference
change_id(prefix) # Explicit change ID prefix lookup
parents(x, 2) # Parents with depth
exactly(x, 3) # Assert exactly N revisionsSee references/revsets.md for comprehensive revset patterns.
-r not --revisionsjj log -r xyz # ✅
jj log --revisions xyz # ❌--no-edit for parallel branchesjj new parent -m "A"; jj new -m "B" # ❌ B is child of A!
jj new --no-edit parent -m "A"; jj new --no-edit parent -m "B" # ✅ Both children of parentjj log -r 'description(substring:"[todo]")' # ✅-o/--onto instead of -d/--destination (v0.36+)jj rebase -s xyz -o main # ✅ New syntax
jj rebase -s xyz -d main # ⚠️ Deprecated (still works but warns)Revset symbols no longer resolve to multiple revisions:
jj log -r abc # ❌ Error if 'abc' matches multiple change IDs
jj log -r 'change_id(abc)' # ✅ Explicitly query by prefix
jj log -r 'bookmarks(abc)' # ✅ For bookmark name patternsjj diff 'src/*.rs' # Matches glob pattern by default
jj diff 'cwd:"src/*.rs"' # Use cwd: prefix for literal path with special charsHelper scripts in scripts/. Add to PATH or invoke directly.
| Script | Purpose |
|---|---|
jj-show-desc [REV] | Print full description only |
jj-desc-transform <REV> <CMD...> | Pipe description through command |
jj-batch-desc <SED_FILE> <REV...> | Batch transform descriptions |
jj-checkpoint [NAME] | Record op ID before risky operations |
jj op log # Find operation before problem
jj op restore <op-id> # Restore the WHOLE repository (history included) to that statejj exe is self-documenting:
jj help -k bookmarks - JJ bookmarks, how they relate to Git branches and how to push/fetch them from Git remotesjj help -k revsets - Revset DSL syntax and patternsjj help -k filesets - Filepath selection DSL, ie. how to tell jj commands to operate only on specific filesjj help -k templates - Template language and custom output--help pagereferences/command-syntax.md - Command flag detailsreferences/batch-operations.md - Complex batch transformations on revision descriptionsaed1afb
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.