npx skills add https://github.com/knoopx/pi --skill jujutsu专注于并发开发和易用性的 Git 兼容版本控制系统。
⚠️ 不是 Git! Jujutsu 语法与 Git 不同:
- 父提交:
@-而非@~1或@^- 祖父提交:
@--而非@~2- 子提交:
@+而非@~-1- 使用
jj log而非jj changes
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 命令 | 描述 |
|---|---|
jj st | 显示工作副本状态 |
jj log | 显示变更日志 |
jj diff | 显示工作副本中的变更 |
jj new | 创建新变更 |
jj desc | 编辑变更描述 |
jj squash | 将变更移动到父提交 |
jj split | 拆分当前变更 |
jj rebase -s src -d dest | 变基变更 |
jj absorb | 将变更移动到可变修订栈中 |
jj bisect | 通过二分查找定位有问题的修订 |
jj fix | 使用格式化修复更新文件 |
jj sign | 对修订进行加密签名 |
jj metaedit | 修改元数据而不改变内容 |
jj git init # 在现有 git 仓库中初始化
jj git init --colocate # 与 git 并存
jj new # 创建新变更
jj desc -m "feat: add feature" # 设置描述
jj log # 查看历史记录
jj edit change-id # 切换到指定变更
jj new --before @ # 时间旅行(在当前提交之前创建)
jj edit @- # 转到父提交
jj edit change-id # 切换到特定变更
jj next --edit # 下一个子变更
jj edit @- # 父变更
jj new --before @ -m msg # 在当前提交之前插入
jj new x yz -m msg # 合并变更
jj rebase -s src -d dest # 将源变基到目标
jj abandon # 删除当前变更
jj resolve # 交互式冲突解决
# 编辑文件,然后继续
父/子操作符:
| 语法 | 含义 | 示例 |
|---|---|---|
@- | @ 的父提交 | jj diff -r @- |
@-- | 祖父提交 | jj log -r @-- |
x- | x 的父提交 | jj diff -r abc123- |
@+ | @ 的子提交 | jj log -r @+ |
x::y | 从 x 到 y(包含) | jj log -r main::@ |
x..y | 从 x 到 y(不包含) | jj log -r main..@ |
| `x | y` | 并集(或) |
⚠️ 常见错误:
@~1 → ✅ @- (父提交)@^ → ✅ @- (父提交)@~-1 → ✅ @+ (子提交)jj changes → ✅ jj log 或 jj diffa,b,c → ✅ a | b | c (并集使用管道符,而非逗号)函数:
jj log -r 'heads(all())' # 所有头指针
jj log -r 'remote_bookmarks()..' # 不在远程的提交
jj log -r 'author(name)' # 按作者筛选
jj log -r 'description(regex)' # 按描述筛选
jj log -r 'mine()' # 我的提交
jj log -r 'committer_date(after:"7 days ago")' # 近期提交
jj log -r 'mine() & committer_date(after:"yesterday")' # 我近期的提交
jj log -T 'commit_id ++ "\n" ++ description'
jj bookmark create main -r @ # 创建书签
jj git push --bookmark main # 推送书签
jj git fetch # 从远程获取
jj bookmark track main@origin # 跟踪远程分支
jj absorb # 自动将变更移动到栈中相关的提交
jj bisect start # 开始二分查找
jj bisect good # 标记当前提交为"好"
jj bisect bad # 标记当前提交为"坏"
jj fix # 在文件上运行配置的格式化工具
jj sign -r @ # 签名当前修订
jj metaedit -r @ -m "new message" # 仅编辑元数据
type(scope): descjj undo 撤销操作jj op log 查看操作历史jj absorb 对于修复提交栈中的提交非常强大每周安装量
71
代码仓库
GitHub 星标数
22
首次出现
2026年1月24日
安全审计
安装于
opencode66
codex65
gemini-cli63
cursor60
github-copilot59
claude-code54
Git-compatible VCS focused on concurrent development and ease of use.
⚠️ Not Git! Jujutsu syntax differs from Git:
- Parent:
@-not@~1or@^- Grandparent:
@--not@~2- Child:
@+not@~-1- Use
jj lognotjj changes
| Command | Description |
|---|---|
jj st | Show working copy status |
jj log | Show change log |
jj diff | Show changes in working copy |
jj new | Create new change |
jj desc | Edit change description |
jj squash | Move changes to parent |
jj git init # Init in existing git repo
jj git init --colocate # Side-by-side with git
jj new # Create new change
jj desc -m "feat: add feature" # Set description
jj log # View history
jj edit change-id # Switch to change
jj new --before @ # Time travel (create before current)
jj edit @- # Go to parent
jj edit change-id # Switch to specific change
jj next --edit # Next child change
jj edit @- # Parent change
jj new --before @ -m msg # Insert before current
jj new x yz -m msg # Merge changes
jj rebase -s src -d dest # Rebase source onto dest
jj abandon # Delete current change
jj resolve # Interactive conflict resolution
# Edit files, then continue
Parent/child operators:
| Syntax | Meaning | Example |
|---|---|---|
@- | Parent of @ | jj diff -r @- |
@-- | Grandparent | jj log -r @-- |
x- | Parent of x | jj diff -r abc123- |
@+ |
⚠️ Common mistakes:
@~1 → ✅ @- (parent)@^ → ✅ @- (parent)@~-1 → ✅ @+ (child)jj changes → ✅ jj log or jj diffa,b,c → ✅ a | b | c (union uses pipe, not comma)Functions:
jj log -r 'heads(all())' # All heads
jj log -r 'remote_bookmarks()..' # Not on remote
jj log -r 'author(name)' # By author
jj log -r 'description(regex)' # By description
jj log -r 'mine()' # My commits
jj log -r 'committer_date(after:"7 days ago")' # Recent commits
jj log -r 'mine() & committer_date(after:"yesterday")' # My recent
jj log -T 'commit_id ++ "\n" ++ description'
jj bookmark create main -r @ # Create bookmark
jj git push --bookmark main # Push bookmark
jj git fetch # Fetch from remote
jj bookmark track main@origin # Track remote
jj absorb # Auto-move changes to relevant commits in stack
jj bisect start # Start bisection
jj bisect good # Mark current as good
jj bisect bad # Mark current as bad
jj fix # Run configured formatters on files
jj sign -r @ # Sign current revision
jj metaedit -r @ -m "new message" # Edit metadata only
type(scope): descjj undo to revert operationsjj op log to see operation historyjj absorb is powerful for fixing up commits in a stackWeekly Installs
71
Repository
GitHub Stars
22
First Seen
Jan 24, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode66
codex65
gemini-cli63
cursor60
github-copilot59
claude-code54
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
120,000 周安装
jj split| Split current change |
jj rebase -s src -d dest | Rebase changes |
jj absorb | Move changes into stack of mutable revisions |
jj bisect | Find bad revision by bisection |
jj fix | Update files with formatting fixes |
jj sign | Cryptographically sign a revision |
jj metaedit | Modify metadata without changing content |
| Child of @ |
jj log -r @+ |
x::y | x to y inclusive | jj log -r main::@ |
x..y | x to y exclusive | jj log -r main..@ |
| `x | y` | Union (or) |