Follow us
Breaking
Software

Common mistakes with Jujutsu 0.25 for Git and Mercurial developers

Jujutsu offers faster rebases and unique conflict management by treating working copies as commits. Developers using the Rust-native tool can avoid common workspace errors and improve workflow efficiency compared to traditional Git operations.

Share

Jujutsu operates on a mental model where every working copy exists as a commit. This difference replaces the Git staging ritual. Users identify the working copy using the @ alias. Many developers fail when they create JJ workspaces without a .git directory. These workspaces prevent Codex from enabling the desktop review pane because Codex relies on Git repository detection. To fix this, developers use colocation mode to treat the repository as a Git worktree. This ensures the Codex review pane remains visible. You should understand that the working copy on Jujutsu functions as a commit, which differs from Git. Developers switching from Git to Jujutsu must realize that the working copy functions as a commit, which removes the need for the staging area or the index found in traditional version control systems. The jj status command shows what changes exist in the working copy. Users also use jj describe to alter a commit message. If a user invokes jj describe without arguments, the tool alters the message of the working copy. To finalize a commit and stop editing, the user creates a new working commit on top of the old one with jj new. For developers working with large monorepos, Jujutsu fetches information from its storage backend lazily. This lazy fetching supports large scale projects. However, importing many references from a Git repository remains slow. Jujutsu also lacks support for partial clones, shallow clones, and signed commits. Users clone existing Git repositories for use with Jujutsu using the jj git clone command. This process can be slow when managing many references.

Jujutsu treats conflicts as a representation of conflicting trees. This method eliminates the need for commands like git rebase –continue. When a user rebases, the operation completes even if it leaves conflicted trees in the history. These trees remain editable like ordinary trees. The system allows developers to ignore conflicts and continue working until they have time to resolve them. This capability stems from how Jujutsu stores conflict data internally. The Rust-native backend enables fast, atomic, pervasive rebases. These operations complete significantly faster than Git rebases because they avoid walking the commit graph. The operation log also tracks previous states of the repository. This log powers the jj undo command to reverse the effects of any command. The speed of the rebase operation drives interest in the tool. Elijah Newren and Christian Couder proposed a new git replay command to improve Git rebase performance. However, this still lags behind Jujutsu. When comparing backend languages, Go 1.26 with the Fiber framework achieves 85,000 requests per second with 4.5ms average latency. Rust 1.85 with the Axum framework achieves 102,000 requests per second with 3.8ms average latency. Rust also maintains lower P99 latency at 4.2ms compared to Go’s 12.0ms.

Metric Go (Fiber) Rust (Axum) Winner
Requests/Sec 85,000 102,000 Rust
Average Latency 4.5ms 3.8ms Rust
P99 Latency 12.0ms 4.2ms Rust
Memory (Load) 240 MB 45 MB Rust

Jujutsu lacks support for hooks, submodules, and Git LFS. The absence of hooks makes it difficult to trigger external scripts during operations. This difficulty arises because Jujutsu performs operations directly against the underlying storage in memory. Such in-memory transformations prevent external programs from interacting with the repository via the filesystem. This lack of filesystem interaction also means that Jujutsu lacks configurable merge strategies. Gerrit users encounter mapping challenges between Jujutsu change IDs and Gerrit Change-Ids. The jj gerrit upload command resolves this by adding a Gerrit-style Change-Id footer. This process allows small, clean commits to evolve over time. Users can also configure JJ to automatically add Change-Id footers to all change descriptions. To associate a JJ change with a specific change already uploaded to Gerrit, a user can copy the Change-Id footer from Gerrit to the bottom of the commit description in JJ. The jj gerrit upload command accepts revisions, which may expand to multiple commits. The -r @- argument selects the commit previous to the current one. Developers can also use the -r A..B syntax to select commits that are ancestors of B but not of A. To set a default branch, users run jj config set –repo gerrit.default-branch-name <branch name>. Users can also set a default remote with jj config set –repo gerrit.default-remote <remote name>. Will the native backend ever reach a state of readiness for serious, large-scale professional use? Developers should adopt Jujutsu for its superior rebase speed and conflict management.

Share

Technewsdaily

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