スキル一覧に戻る
ahmedelgabri

jujutsu

by ahmedelgabri

jujutsuは、ソフトウェア開発を効率化するスキルです。開発ワークフロー全体をサポートし、チームの生産性向上とコード品質の改善を実現します。

282🍴 17📅 2026年1月23日
GitHubで見るManusで実行

SKILL.md


name: jujutsu description: | This skill should be used when the user mentions Jujutsu version control, "jj" commands, working with jj repositories, or asks about Git to Jujutsu equivalents. Triggers on keywords like "jujutsu", "jj", "jj-vcs", "jj repo", "jj commit", "jj log", "jj new", "jj squash", "jj rebase", "jj bookmark", or questions about Jujutsu workflows and concepts. version: 1.0.0

Jujutsu (jj) Version Control Skill

This skill enables working with Jujutsu, a Git-compatible version control system with a fundamentally different model. Jujutsu treats the working copy as a commit, has no staging area, and uses change IDs for stable references across rewrites.

Core Concepts

Working Copy as a Commit

Unlike Git, the working copy IS a commit. Changes are automatically snapshotted when running jj commands - no explicit add or staging required.

Change IDs vs Commit IDs

Every commit has two identifiers:

  • Change ID: Stable across rewrites (e.g., kkmpptxz)
  • Commit ID: Hash-based, changes on rewrite (e.g., abc123def)

Use change IDs for references that survive rebases.

Revsets

Revsets are expressions to select commits:

  • @ - Working copy commit
  • @- - Parent of working copy
  • root() - Repository root
  • bookmarks() - All bookmarked commits
  • foo..bar - Commits from foo to bar (exclusive)
  • foo::bar - Commits from foo to bar (inclusive)
  • A | B - Union
  • A & B - Intersection
  • ~A - Complement

Bookmarks (not Branches)

Bookmarks are named pointers that map to Git branches. They move automatically when commits are rewritten.

Quick Reference

Git CommandJujutsu EquivalentNotes
git initjj git initUse --colocate for Git interop
git clone URLjj git clone URLGit repos only
git statusjj stShows working copy diff
git diffjj diffDiff of working copy
git diff --stagedN/ANo staging area
git add && git commitjj commitAuto-includes all changes
git commit --amendjj squashSquash into parent
git log --oneline --graphjj logVisual commit graph
git show COMMITjj show REVShow revision details
git checkout -b NAMEjj newStart new change
git switch BRANCHjj edit BOOKMARKEdit existing change
git reset --hardjj abandonDiscard working copy
git stashjj newJust start new change
git rebase B Ajj rebase -b A -d BRebase A onto B
git cherry-pickjj duplicateCopy commits
git mergejj new A BCreates merge commit
git fetchjj git fetchFetch from remote
git pushjj git pushPush bookmarks
git branch NAMEjj bookmark create NAMECreate bookmark

Common Workflows

Starting Work

# Clone a repo
jj git clone https://github.com/owner/repo

# Or init in existing directory
jj git init --colocate

# Create new change from main
jj new main

# Work on files (no add needed)
# Edit files...

# Describe the change
jj describe -m "feat: add new feature"

# Finish and start next change
jj new

Viewing State

# Show log with graph
jj log

# Show working copy diff
jj diff

# Show specific revision
jj show @-

# Status of working copy
jj st

# Show file at revision
jj file show path/to/file -r REV

Modifying History

# Squash working copy into parent
jj squash

# Squash specific change into parent
jj squash -r CHANGE

# Interactive squash (select hunks)
jj squash -i

# Split a commit
jj split

# Edit a commit message
jj describe -r REV -m "new message"

# Edit an older commit
jj edit CHANGE
# Make changes...
jj new # Return to tip

Rebasing

# Rebase current change onto main
jj rebase -d main

# Rebase branch onto main
jj rebase -b BRANCH -d main

# Rebase revision and descendants
jj rebase -r REV -d DEST

# Rebase source and descendants
jj rebase -s SOURCE -d DEST

Bookmarks and Remotes

# Create bookmark at current change
jj bookmark create NAME

# Create bookmark at specific revision
jj bookmark create NAME -r REV

# Move bookmark
jj bookmark move NAME -r REV

# List bookmarks
jj bookmark list

# Track remote bookmark
jj bookmark track NAME@origin

# Push bookmark to remote
jj git push --bookmark NAME

# Push all bookmarks
jj git push --all

# Fetch from remote
jj git fetch

Working with GitHub

# Create PR branch
jj new main
# Work...
jj describe -m "feat: my feature"
jj bookmark create my-feature
jj git push --bookmark my-feature

# Update PR after review
jj edit my-feature
# Make changes...
jj git push --bookmark my-feature

# After merge, clean up
jj git fetch
jj bookmark delete my-feature

Conflict Resolution

Conflicts in Jujutsu don't block rebases - they're recorded in commits.

# Check for conflicts
jj log # Conflicted commits shown with marker

# Resolve conflicts
jj new CONFLICTED_CHANGE
# Edit conflict markers in files
jj squash # Squash resolution into conflicted change

# Or use resolve command
jj resolve

Undo Operations

# View operation log
jj op log

# Undo last operation
jj undo

# Restore to specific operation
jj op restore OP_ID

Key Differences from Git

  1. No staging area: All file changes automatically included
  2. Working copy is a commit: Always have a "draft" commit
  3. Conflicts don't block: Rebases complete, conflicts recorded
  4. Change IDs: Stable references across history rewrites
  5. Operation log: Full undo capability for any operation
  6. Automatic snapshot: No risk of losing uncommitted work

Colocated vs Non-colocated

Colocated (jj git init --colocate):

  • .git and .jj in same directory
  • Can use Git tools alongside jj
  • Git sees jj commits

Non-colocated (jj git init):

  • Only .jj directory
  • Pure jj workflow
  • Use jj git export to sync to Git

Additional Resources

Reference Files

For detailed command reference and advanced workflows:

  • references/git-command-table.md - Complete Git to Jujutsu command mapping
  • references/revsets.md - Revset syntax and examples

External Documentation

スコア

総合スコア

75/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

+5
最近の活動

1ヶ月以内に更新

+10
フォーク

10回以上フォークされている

+5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

+5

レビュー

💬

レビュー機能は近日公開予定です