Jujutsu Primer
A comprehensive tutorial on Jujutsu (jj), a modern Git-compatible version control system that simplifies workflows with automatic rebasing, change IDs, and native undo.
summary is enough Skim this practical introduction to Jujutsu if you want a quick conceptual overview of its unique graph model, change IDs, and automatic rebase features.
summary
This primer demonstrates how to use Jujutsu (jj), a version control system designed to operate seamlessly alongside existing Git repositories. It explains core concepts like change IDs, revsets, and automatic rebasing, which let developers maintain a branchless graph of commits without a traditional staging area. The guide walks through practical operations including conflict resolution, undoing mistakes via the operation log, and the squash workflow. Ultimately, jj aims to reduce mental overhead by keeping version control bookkeeping out of the user's working memory.
key points
- Jujutsu uses stable change IDs alongside Git commit IDs, allowing logical changes to evolve across hashes without losing their identity.
- The working copy is automatically snapshotted and rebased on descendant commits, eliminating manual staging and complex rebase choreography.
- Conflicts do not block operations immediately; jj allows users to continue working, inspect conflicts later, and cleanly resolve them using a squash workflow.
- An operation log tracks all history and provides a native jj undo command to safely reverse any past action.
who should read it
Developers looking to escape Git's friction who want to explore Jujutsu's branchless, automatic-rebasing version control model.
discussion warm
consensus
Most participants praise Jujutsu for reducing cognitive overhead, smoothing out stacked diff workflows, and pairing exceptionally well with AI coding assistants like Claude.
pushback
Some experienced Git users argue that the lack of a traditional staging area and deep muscle memory for Git make switching unnecessary or risky.
JJ, using the squash workflow, is brilliant for working with Claude
The workflow is straightforward: I create a named revision for the work I want to do, then an unnamed revision on top. I prompt Claude, changes land in the unnamed revision, I review those, squash the parts that I'm ready to accept, prompt some more to iterate on the parts that aren't up to par yet. Rinse and repeat until the topmost (unnamed) revision is empty.
I instructed Claude that I use jj with the squash workflow, so it should never touch revisions with a non-empty description (I also needed to tell it to shut up …
Explains a concrete, practical workflow for using jj's squash features to cleanly iterate on code generated by AI coding assistants.
Generated by an LLM from the article and thread. Check the sources before relying on it.