Skip to content

Getting Started

Start from a file or Dired buffer whose default-directory is inside an existing Jujutsu repository, then run M-x majutsu-log (the shorter M-x majutsu is an alias). With a prefix argument, or when the current directory is outside a repository, Majutsu asks which directory to use. If that directory is not a repository either, it asks before running jj git init; declining leaves the directory unchanged.

The log buffer is the safest place to learn the interface. Find the working copy revision, marked @.

Vanilla: Use n and p to move by revision section. TAB expands or collapses the section at point, while [ and ] move to a visible parent or child.

Evil: Majutsu starts the log in Normal state. Use C-j and C-k to move by section; g j and g k move between sibling sections. TAB expands or collapses the section at point, while [ and ] move to a visible parent or child.

Point is significant: commands opened from the log use the revision under point as their default. In particular, RET on a revision runs jj edit; it changes which revision the workspace edits, so do not use it merely to inspect a revision.

To inspect without running a history-rewriting command, put point on @ and press D (majutsu-diff-dwim). The resulting diff buffer shows the current change.

Vanilla: TAB folds files or hunks, n and p move through sections, and q returns to the log.

Evil: TAB folds files or hunks, C-j and C-k move through sections, and q returns to the log without leaving Normal state.

For an explicit selection, press d in the log to open the Diff transient. Its -r/r entry has two paths: -r reads a revset, while r toggles the revision at point into the --revisions selection. Press d to execute the diff, or c to clear the selection first. This does not invoke a rewrite command, although jj may snapshot changed working-copy files before producing output. Selections only become arguments when an action is executed.

Use ? to open the dispatcher and see the commands valid in the current buffer.

Vanilla: A safe first loop is: move through the log, inspect a diff, return with q, and refresh with g. If a jj command fails, press $ to open the process buffer and read its complete output.

Evil: A safe first loop is: move through the log in Normal state, inspect a diff, return with q, and refresh with g r. If a jj command fails, press ` to open the process buffer and read its complete output.

Only after this loop is familiar should you move on to commands in Manipulating, which can rewrite repository history and may ask for confirmation.