AgentSkillsCN

jj

在jj仓库中工作时,使用jj(Jujutsu)而非git。

SKILL.md
--- frontmatter
name: jj
description: Use jj (Jujutsu) instead of git when working in a jj repository.
alwaysApply: true

Use jj Instead of Git

When working in a directory that contains a .jj folder, use jj commands instead of git commands.

Detection

Check if .jj exists in the project root. If found, use jj for all version control operations.

Command Translations

Git Commandjj Equivalent
git statusjj status
git diffjj diff
git logjj log
git addNot needed - jj auto-tracks
git commitjj commit
git commit --amendjj squash
git branchjj branch list
git checkout -bjj new
git rebasejj rebase
git pushjj git push
git fetchjj git fetch

Key Differences

  1. No staging area: All changes are automatically tracked
  2. Working copy is a commit: You're always amending the @ revision
  3. Branches are labels: Work on anonymous commits, optionally label them

Common Workflows

bash
jj status          # View status
jj diff            # View changes
jj log             # View history
jj new             # Start a new change
jj commit -m "msg" # Describe current change and start new one
jj describe -m "msg"  # Update commit message
jj git push        # Push to remote
jj git fetch       # Fetch from remote