AgentSkillsCN

jujutsu

关于Jujutsu(jj)版本控制系统指南。当处理提交、分支、拉取请求、PR、版本控制、变基、推送或用户提到jj、git或版本控制操作时使用。

SKILL.md
--- frontmatter
name: jujutsu
description: Guide to Jujutsu (jj) version control system. Use when working with commits, branches, pull requests, PRs, version control, rebasing, pushing, or when the user mentions jj, git, or version control operations.

Jujutsu (jj) Version Control Guide

Jujutsu is a modern, Git-compatible version control system. This project uses jj colocated with git.

Key Differences from Git

ConceptGitJujutsu
Staging areaExplicit git addNone - working copy IS a commit
BranchesNamed refsBookmarks (auto-follow rewrites)
StashSeparate stash stackNot needed - just use commits
Amendgit commit --amendJust edit files, or use jj squash
IdentityCommit ID onlyChange ID (stable) + Commit ID

Essential Commands

TaskCommand
Statusjj status or jj st
Diffjj diff
Logjj log
Commit & continuejj commit -m "message"
Update messagejj describe -m "message"
New empty commitjj new
Squash into parentjj squash
Undo last operationjj undo
Fetch from remotejj git fetch
Push to remotejj git push
Create & push bookmarkjj git push --named name=@
Push existing bookmarkjj git push --bookmark name

Working Copy Model

The working copy (@) is always a commit. File changes are automatically tracked - no staging required.

code
parent commit
    ↓
@ (working copy) ← your edits go here automatically

Quick Git-to-Jujutsu Translation

GitJujutsu
git statusjj st
git diffjj diff
git logjj log
git add . && git commit -m "msg"jj commit -m "msg"
git pushjj git push
git pulljj git fetch then jj rebase -d main@origin
git checkout -b branchjj new main then jj bookmark set branch
git branchjj bookmark list
git stashjj new (just start new commit)
git blamejj file annotate

Additional References