Jujutsu VCS Decoded: Essential Workflows for Git Veterans
Share this article
Beyond Git: Embracing Jujutsu's Version Control Revolution
For developers entrenched in Git's workflow, adopting Jujutsu (jj) can feel simultaneously liberating and disorienting. Its immutable history model and operation-centric design solve fundamental Git pain points, yet the mental shift demands new navigation patterns. As Maddie WTF astutely observes in their practical guide, this transition often leaves developers feeling "trapped by the tool"—slow, uncertain, and constantly reaching for documentation. This handbook bridges that gap by mapping common Git operations to Jujutsu workflows.
Rewriting History Without Fear
Jujutsu transforms risky Git operations into safe, everyday actions:
# Amend commits directly (vs git commit --amend)
jj edit <revision-id>
# Or safely stage amendments via squash:
jj new <base-revision>
# ...edit files...
jj squash
# Discard changes without losing context
jj restore path/to/file # File-level undo
jj abandon # Revision-level undo
Unlike Git's destructive history rewriting, Jujutsu's immutable revisions let you experiment freely. The operation log (jj op log) acts as a safety net, allowing granular undo of any action via jj op undo or rewinding to specific states with jj op restore.
Precision History Crafting
Jujutsu provides surgical control over revision topology:
# Insert commits between revisions (impossible in vanilla Git)
jj new -A <parent-rev> # Insert AFTER parent
jj new -B <child-rev> # Insert BEFORE child
# Split revisions interactively
jj split # TUI-guided change partitioning
# Cherry-pick via duplication
jj duplicate <source-rev> -A <target-rev>
These operations shine when maintaining linear histories or backporting fixes. The -A/-B flags eliminate Git's awkward "temporary branch dance" for insertions.
Rebasing Simplified
Jujutsu eliminates Git's rebase anxiety:
# Rebase entire branch lineages
jj rebase --branch feature-x --destination main
# Conflict resolution workflow:
jj edit conflicted-rev
# ...resolve conflicts...
jj squash # Or commit via new + squash
By rebasing entire dependency graphs rather than single branches, Jujutsu maintains change relationships automatically. Conflict markers appear directly in working copies—no intermediate staging steps.
Git Interop and Branch Management
Jujutsu coexists peacefully with Git:
# Delete bookmarks (branches)
jj bookmark delete stale-branch
jj git push --deleted
# Return to Git workflows anytime
git checkout main
The shared object store means teams can mix tools transparently. Jujutsu's detached HEAD equivalent (@) becomes a strength, not a hazard.
The Immutable Advantage
Jujutsu's architecture fundamentally changes version control psychology. Every operation is recorded in the op log, enabling fearless experimentation. As Maddie notes, commands like jj restore --from main file.txt provide Git-like checkout semantics while preserving history integrity. Merges become explicit revisions (jj new branch-a branch-b) rather than implicit pointer moves.
This paradigm shift—from mutable history to auditable operations—empowers developers to refine work continuously. What feels unfamiliar today becomes tomorrow's productivity multiplier, turning version control from a necessary evil into a creative accelerator.
Source: Adapted from "Jujutsu For Busy Devs, Part 2" by Maddie WTF