Skip to content
jj logo

jj Reference Guide

jj

Reference guide for jj (Jujutsu) version control operations

SKILL.md

Full skill instructions

jj Reference Guide

Reference for common jj operations, conventions, and patterns used in this codebase.

Commit Description Format

All commit descriptions MUST be a single line following this format:

<project-prefix>: <short description>

IMPORTANT: Always use a one-line commit message. Never use multi-line descriptions or bullet points.

Project prefix is the descriptive folder path identifying the subsystem (e.g., src/​auth, lib/​utils, services/​api).

Description starts with a lowercase verb: add, update, fix, refactor, remove, etc.

Examples

src/​auth: add JWT token refresh logic
lib/​utils: fix date parsing for ISO formats
services/​api: add rate limiting middleware
db/​migrations: add users table
docs: update installation instructions
tests/​integration: add checkout flow tests

Analyzing Changes

Overview Commands

# Files changed with change type (modified/​added/​deleted)
jj diff --summary
jj show <rev> --summary

# Lines changed per file histogram
jj diff --stat
jj diff -r <rev> --stat

# Full diff
jj diff
jj diff -r <rev>

Size-Based Approach

  • Small changes (≤5 files, ≤200 lines): read the diff directly
  • Large changes (>5 files or >200 lines): use /​jj-context to get a structured summary

Common Operations

Creating a Commit (jj commit)

Creates a new commit from working copy changes:

jj commit -m "<project-prefix>: <description>"

After committing, @ becomes an empty working copy on top of the new commit.

Describing a Commit (jj describe)

Sets or updates the description of an existing commit:

# Describe parent commit (most common)
jj describe @- -m "<project-prefix>: <description>"

# Describe any commit
jj describe <rev> -m "<description>"

Creating a Bookmark (jj bookmark)

Bookmarks use john/<descriptive-name> format with kebab-case:

# On parent commit (if @ is empty)
jj bookmark create john/<name> -r @-

# On current commit
jj bookmark create john/<name>

# List bookmarks
jj bookmark list

Naming: Use 2-4 word kebab-case names describing the work:

  • john/​s3-inventory-download
  • john/​fix-auth-refresh
  • john/​refactor-poller-config

Splitting a Commit (jj split)

Splits a commit into multiple commits by file:

# Split specific files into a new commit
jj split -r <rev> -m "<description>" path/​to/​file1 path/​to/​file2

# Last group: just describe the remainder
jj describe -r @- -m "<description>"

Note: After each split, the revision ID changes. Use @- to refer to the result.

Grouping suggestions:

  • Core feature + its tests together
  • Configuration/​infrastructure separate
  • Database migrations separate
  • Refactoring/​cleanup separate

Squashing Changes (jj squash)

Moves changes from working copy into ancestor commits.

Without options, squashes all changes from @ into its parent (@-):

jj squash  # @ → @-

With --into (or -t), squash into a specific commit:

jj squash --into <change-id> path/​to/​file.py  # specific files
jj squash --into <change-id> "src/​**/​*.py"    # glob pattern
jj squash --into @--                           # grandparent

For sub-file chunks (specific hunks, not whole files):

  1. Save original @ change ID: jj log -r @ --no-graph -T 'change_id'
  2. Create intermediate: jj new --insert-before @
  3. Write only the hunks for target commit
  4. Squash: jj squash --into <target-change-id>
  5. Return to rebased @: jj edit <rebased-@-change-id>
  6. Remove duplicated hunks
  7. Restore working copy: jj new

Always use change IDs (e.g., ksrmwuon) not commit IDs - they're stable across rewrites.

Revision Syntax

SyntaxMeaning
@Current working copy commit
x-Parent(s) of x (e.g., @- = parent of working copy)
x+Children of x
@--Grandparent (@- then - again)
trunk()Main branch (main/​master)
::xAll ancestors of x, including x
x::All descendants of x, including x
x..yAncestors of y that are NOT ancestors of x
x::yDescendants of x that are also ancestors of y
<change-id>Specific commit by change ID (e.g., ksrmwuon)

Working Copy Behavior

  • In jj, @ (working copy) is often an empty commit on top of your actual work
  • Check jj log for "(empty)" to know if @ has changes
  • jj commit creates commit and leaves @ empty
  • jj describe modifies existing commit, doesn't change @

More DevOps & CI/CD skills

Project scaffolding, deployment configuration, and CI/CD setup for Google ADK agents.

6K 472.6K
View

Set up tracing, logging, and monitoring for deployed ADK agents across Cloud Trace, BigQuery, and third-party platforms.

6K 472.6K
View

Enterprise Azure infrastructure architect generating Bicep or Terraform from workload descriptions.

1.5K 454.3K
View
azure-kubernetes logo
DevOps & CI/CD

azure-kubernetes

Plan and configure production-ready Azure Kubernetes Service clusters with Day-0 and Day-1 best practices.

1.5K 447.1K
View

Raw mechanical interfaces fusing Swiss typographic print with military terminal aesthetics. Rigid grids, extreme type scale contrast, utilitarian color, analog degradation effects. For data-heavy dashboards, portfolios, or editorial sites that need to feel like declassified blueprints.

92.7K 354.9K
View
just-scrape logo
DevOps & CI/CD

just-scrape

Web search, scraping, extraction, crawling, and monitoring via ScrapeGraph AI CLI.

69 245K
View

Skill for working with Firebase Hosting (Classic). Use this when you want to deploy static web apps, Single Page Apps (SPAs), or simple microservices. Do NOT use for Firebase App Hosting.

462 159.7K
View

Deploy and manage web apps with Firebase App Hosting. Use this skill when deploying Next.js/Angular apps with backends.

462 159.1K
View
deploy-to-vercel logo
DevOps & CI/CD

deploy-to-vercel

Deploy applications and websites to Vercel. Use when the user requests deployment actions like "deploy my app", "deploy and give me the link", "push this live", or "create a preview deployment".

31.9K 146.6K
View
programmatic-seo logo
DevOps & CI/CD

programmatic-seo

Build SEO-optimized pages at scale using templates, data, and proven playbook patterns.

53.3K 140.1K
View

Design and build isolated, reusable Convex backend components with clear boundaries and app-facing wrappers.

63 123.5K
View

Deploy and manage projects on Vercel using token-based authentication. Use when working with Vercel CLI using access tokens rather than interactive login — e.g. "deploy to vercel", "set up vercel", "add environment variables to vercel".

31.9K 116.1K
View

Coding & apps AI tools

Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View
I
Coding & apps

Imagica

Build a no-code AI app in minutes.

Freemium
View
E
Coding & apps

Emergent.sh

An IDE for code migration from legacy to modern frameworks through coding agents.

Freemium
View
Wonder Dynamics logo
Coding & apps

Wonder Dynamics

Automate CGI animation in live-action scenes

Paid
View
M
Coding & apps

Mixo

Launch a website in seconds with AI.

Paid
View
AI Code Convert logo
Coding & apps

AI Code Convert

Streamline Your Coding Experience with AI Code Helper

Free
View