hn.today

Jujutsu Primer

ethanlowman.com206 points189 comments
Screenshot of Jujutsu Primer

Jujutsu (jj) is presented as a version-control system for people who know Git, with the central case that its simpler primitives make everyday work less mentally demanding. It can run alongside Git in an existing repository, synchronizing repository state, so users can try it without abandoning familiar tools. The guide walks through installation and configuration, then explains the basic model: commits are snapshots, while stable change IDs identify logical pieces of work even as their commit hashes change. There is no staging area; jj automatically snapshots edits to the working copy when commands inspect or modify repository state.

Work is organized as a graph of commits rather than through named branches. The working copy is itself a revision, and commands such as `jj new`, `jj commit`, and `jj desc` let users create, describe, and extend changes. Because edits or message updates can produce new commit IDs while preserving a change ID, work can evolve without losing its identity. The guide introduces revsets, expressions for selecting revisions - for example, a parent, descendants, or commits in a range - and shows how to inspect those selections with `jj log`. Its contents also preview graph navigation, conflict handling, undo through the operation log, squashing, Git bookmarks and branches, staying oriented, and stacked pull-request workflows.

Read on ethanlowman.com189 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Programming

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.