Follow us
Breaking
Tech News

Moving Git teams to Jujutsu

Jujutsu offers a new mental model for version control by treating the working copy as a commit and handling conflicts as first-class objects. This Rust-based tool simplifies workflows through automatic commits, revset language, and a powerful jj undo command.

Share

A new mental model for revisions

I find that Jujutsu requires a total departure from Git thinking. The system treats the working copy as a commit. Every file change records itself as a normal commit and amends that commit on every subsequent change. This design eliminates the need for a staging area or an index. You skip the manual git add workflow because the system tracks changes automatically. When you finish a task, you run jj new to create a fresh change. This behavior introduces risks for those used to Git’s explicit stages.

In Git, a commit is an immutable snapshot. In Jujutsu, the system revolves around changesets. A changeset provides a stable identifier around a set of changes even as those changes undergo revision. This differs from Git where the commit ID changes when you amend. Because the working copy represents a real commit, checking out a commit results in a new working-copy commit on top of the target. Most commands automatically amend this working-copy commit. This design subsumes features like Git’s stashes or the index. You do not need to use git stash to save uncommitted changes. You simply use jj new or jj edit to manage your work in progress.

Jujutsu is built in Rust, which ensures the tool is fast and reliable. The command set is intuitive for Git users, but you must learn a new way to select revisions. Jujutsu uses a revset language to select commits, which is more logical than remembering Git’s cryptic syntax like HEAD^^ or HEAD~2. This language allows you to query the commit graph with much higher precision.

Comparing workflows and command structures

Jujutsu functions on top of Git, using it as a storage layer. This setup means your teammates see normal Git commits even when you use Jujutsu locally. You can use jj git clone to pull a repository or jj git init to start working in an existing Git project. The system uses bookmarks instead of traditional branches. You only need to create a bookmark when you want to push a stack of changes to a remote. You already know the basics of Git, so you can focus on how Jujutsu handles these workflows differently.

Feature Git Jujutsu
Commit Creation Manual git commit Automatic via working copy
Stashing git stash jj new or jj edit
Conflict Handling Immediate resolution required Conflicts are first-class objects
Branching Named branches Anonymous branching via bookmarks
History Editing git rebase -i jj edit, jj squash, jj amend
Undo Hard to recover jj undo via operation log

I find the conflict handling particularly powerful. While Git treats conflicts as textual diffs that halt progress, Jujutsu treats conflicts as first-class objects. You can commit a change that contains a conflict and move on to other work, resolving the issue later. This capability makes patch-based workflows much easier to manage. When you modify a commit, Jujutsu automatically rebases all descendants on top of the freshly modified one. This feature provides a transparent version of the Git rebase command. Because Jujutsu records every operation from commits and pulls to pushes, you can use the operation log to debug exactly what happened or undo a mistake with a single command through the jj undo function.

The branching model in Jujutsu is anonymous. You do not need to invent a name for every small change. Instead, you use revsets to navigate between different revisions. If you need to address review feedback, you have two choices. You can add new commits to your bookmark, or you can rewrite your existing commits and force-push. This flexibility helps you keep a clean history. For cherry-picking, Jujutsu uses the jj duplicate command. This command is more intuitive than git cherry-pick because it creates a new change that is a duplicate of the original.

Practical frustrations and editor gaps

I recommend Jujutsu to command-line users, but the lack of editor integration remains a major problem. Most developers rely on VS Code or other IDEs to handle interactive rebasing, cherry-picking, or merge conflicts through a visual interface. Jujutsu forces you back to the command line for these tasks. This gap makes the transition difficult for those who prefer a GUI-driven workflow. I find that users often lose time catching themselves after amending a commit they meant to leave alone.

One specific problem involves accidental edits. Because Jujutsu makes editing commits so easy, it becomes muscle memory to modify the current revision. If you do not run jj new, you might modify a commit that your colleagues already pulled. While jj undo or jj split -i can fix these mistakes, they add friction to your day. This problem is worse for teams where developers rely on visual tools to manage their history.

I find that Jujutsu handles large monorepos well due to its efficient handling of large repositories and clearer history visualization. It also simplifies integration of remote changes through jj rebase -d main@origin. You can even pass Git push options to the server. For example, you can use jj git push -o merge_request.create to trigger a merge request in GitLab. Do you think the lack of native SSH signing support in some configurations means it will never replace tools like Sapling for enterprise users?

Share

Technewsdaily

Senior tech writer covering AI, gadgets and cybersecurity. Breaking down the news that matters, every day.