Glean 拾遗
Daily /2026-09-02 / A Git-compatible VCS with a commit-centric workflow

A Git-compatible VCS with a commit-centric workflow

Source github.com Glean’d 2026-09-02 06:00 Read 2 min
AI summary

Jujutsu (jj) is an open-source version control system written in Rust. It aims to make the everyday VCS workflow simpler while staying compatible with the Git ecosystem. The key design is a working copy that is automatically committed: every file change becomes a snapshot you can revisit or revert. An operation log records every state mutation, providing robust undo/redo. Conflicts are first-class data objects instead of inline text markers, making merges and rebases more predictable. jj can be used in existing Git repositories or as a standalone VCS, so it supports incremental adoption. This project is relevant for engineers exploring modern VCS design, Git workflows, and high-quality Rust-based tooling.

Original · 2 min
github.com ↗
§ 1

Jujutsu (jj) is a version control system written in Rust that aims to be both simple and powerful while staying compatible with Git. It is a 'commit-centric' tool: instead of building workflows around branches and staging areas, it treats every snapshot of the working copy as a commit object, making history manipulation and collaboration more direct. With over 31k GitHub stars and an Apache-2.0 license, it is a popular alternative for developers who want a fresh take on version control without leaving the Git ecosystem.

Jujutsu(简称 jj)是一个用 Rust 编写的版本控制系统,目标是在保持 Git 兼容的同时做到既简单又强大。它的核心是“以提交为中心”:不像传统工作流围绕分支和暂存区,而是把工作副本的每次快照都当作一个 commit 对象,让历史修改与协作更加直接。项目在 GitHub 上已获得超过 3.1 万 star,采用 Apache-2.0 协议,适合那些想体验新式版本控制、又不愿抛弃 Git 生态的开发者。

§ 2

Traditional Git workflows are powerful but notoriously complex. The three-way split between working directory, index (staging area), and commit constantly trips up newcomers, and operations like rebase or amend often require careful sequencing to avoid losing work. Jujutsu removes the index entirely and models the working copy as part of the commit graph. This means you can create, reorder, squash, or split commits without the mental overhead of a separate staging area. The repository also ships a dedicated docs/conflicts.md and demos for juggling conflicts, showing that conflict resolution is treated as a first-class concern rather than an edge case.

Git 的能力毋庸置疑,但复杂性也是出了名的。工作目录、暂存区(index)和提交三者的割裂常常让新手困惑;rebase、amend 等操作需要小心排序,否则容易丢失工作。Jujutsu 干脆去掉了暂存区,把工作副本直接纳入提交图的一部分。这样一来,创建、重排、合并或拆分提交都不需要再为暂存区费神。仓库中还专门提供了 docs/conflicts.md 和“juggling conflicts”的演示,说明冲突处理在 jj 里是头等公民,而不是边缘情况。

§ 3

The heart of Jujutsu is the commit-centric workflow. Every change is a commit, and commits are immutable except for explicit rewriting operations. This uniform model collapses the distinction between branches, tags, and the working copy – they are all just references to commits. The design also embraces an operation log: every action you run is recorded as an operation, which means you can inspect the history of your own work and undo anything. The repo includes demos/demo_operation_log.sh and demos/operation_log.svg to illustrate this capability.

Jujutsu 的设计核心是“以提交为中心”的工作流。每一个变更都是一个 commit,除非显式重写,否则提交不可变。这种统一模型把分支、标签和工作副本之间的差别抹平了——它们都只是指向 commit 的引用。设计上还引入了操作日志(operation log):你执行的每个动作都会被记录为一条操作,因此可以回看自己工作的历史,任意撤销。仓库中的 demos/demo_operation_log.shdemos/operation_log.svg 就展示了这一能力。

§ 4

Jujutsu treats conflicts as normal, inspectable states instead of blocking events. When a merge or rebase results in a conflict, jj records it inside the commit graph and lets you continue working; you can resolve different parts of the conflict incrementally. This is complemented by the working-copy model: the working copy is itself a special commit, so editing files is always part of a versioned context. The demos named demo_resolve_conflicts.sh and demo_working_copy.sh show these behaviors, and the docs/conflicts.md file goes into detail.

Jujutsu 把冲突视为可检视的正常状态,而不是阻塞性事件。当合并或 rebase 产生冲突时,jj 会把它记录在提交图中,让你继续工作;你可以分步解决冲突的不同部分。与之配合的是工作副本模型:工作副本本身就是一个特殊的 commit,所以编辑文件始终处于版本化上下文中。仓库里的 demo_resolve_conflicts.shdemo_working_copy.sh 演示了这些行为,docs/conflicts.md 则给出了更深入的说明。

§ 5

The repository is split into two main Rust crates: core/ contains the engine, while cli/ holds the command-line interface on top of it. This separation keeps the fundamental algorithms testable and reusable. The docs/design/ directory hosts design documents, and the demos/ folder provides reproducible shell scripts plus generated SVG diagrams for each major workflow. Build files such as default.nix, deny.toml, and a CI setup under .github/workflows/ indicate a mature open-source project with attention to reproducibility and quality.

仓库按两个主要 Rust crate 组织:core/ 是引擎,cli/ 是之上的命令行界面。这种分层让底层算法易于测试和复用。docs/design/ 目录存放设计文档,demos/ 文件夹则提供了可复现的 shell 脚本以及每个主要工作流对应的 SVG 图示。default.nixdeny.toml 以及 .github/workflows/ 下的 CI 配置,也说明这是一个注重可复现性与工程质量、相当成熟的开源项目。

§ 6

The fastest way to evaluate jj is to install it using your platform’s package manager, following the instructions at https://jj-vcs.dev. Once installed, you can either initialize a new repository with the jj command or work against an existing Git repository, thanks to the built-in Git compatibility. The repository contains docs/cli-reference.md with the full command list and demos/ with narrated scripts that show the main flows step by step. Start with demo_git_compat.sh to see how jj coexists with Git.

评估 jj 最快的方式是按照官网 https://jj-vcs.dev 的说明安装。装好后,既可以用 jj 命令初始化新仓库,也能利用内置的 Git 兼容性直接操作已有 Git 仓库。仓库里的 docs/cli-reference.md 提供了完整命令列表,demos/ 中有带讲解的脚本,逐步展示主要流程。建议从 demo_git_compat.sh 入手,看看 jj 如何与 Git 共存。

§ 7

Jujutsu is a great fit for developers and teams who want a more uniform and undoable workflow while keeping interoperability with existing Git remotes and hosting platforms. Because it is still evolving, you should expect occasional command or output changes; the project maintains a changelog (CHANGELOG.md) and community docs. If you rely heavily on Git internals or niche extensions, verify that the feature you need is supported. For most day-to-day work, jj’s commit-centric model and safety nets – operation log and first-class conflicts – offer a compelling, lower-stress alternative to Git.

Jujutsu 非常适合希望获得更统一、可任意撤销的工作流,同时又要与现有 Git 远程仓库和托管平台保持互操作的开发者与团队。由于项目仍在快速演进,命令或输出偶尔会变化;项目维护了 CHANGELOG.md 和社区文档来跟踪这些变更。如果你重度依赖 Git 内部机制或冷门扩展,需要先确认所需功能是否受支持。对绝大多数日常开发来说,jj 的以提交为中心模型加上操作日志与一等冲突处理这些安全网,确实提供了一个更省心、更有吸引力的 Git 替代方案。

Open source ↗