Skip to content

Instantly share code, notes, and snippets.

@aquarhead
Created February 14, 2026 00:14
Show Gist options
  • Select an option

  • Save aquarhead/aa34f0c44c43cdafdf7fb72f2adc0018 to your computer and use it in GitHub Desktop.

Select an option

Save aquarhead/aa34f0c44c43cdafdf7fb72f2adc0018 to your computer and use it in GitHub Desktop.
name description
jj
Use Jujutsu (jj) version control system. Git-compatible VCS with auto-committed working copy, first-class conflicts, operation log, and revset language. Use when working with repos that use jj instead of (or alongside) git, for commits, rebases, bookmarks, PRs, workspace management, and version control operations.

Jujutsu (jj) VCS

Core Concepts

  • No staging area — working copy is auto-committed as a new change
  • Change IDs vs commit IDs — changes have stable IDs across rebases; use change IDs (short form like yrym) over commit hashes
  • First-class conflicts — conflicts are stored in commits, not blocking; resolve at any time
  • Operation log — every operation recorded and undoable (jj undo, jj op log)
  • Automatic rebase — descendants rebase automatically when ancestors are modified
  • Revsets — expression language for selecting commits (e.g. trunk()..@, ancestors(@, 5))
  • Bookmarks — jj's equivalent of git branches; can be tracked/untracked from remotes

Common Workflow

# Start new work
jj new main              # create new change on top of main
jj describe -m "message" # describe the change

# Iterate
# (just edit files — working copy auto-commits)
jj diff                  # see what changed
jj log                   # view history

# Commit and continue
jj commit -m "message"   # snapshot current change, create new empty one on top

# Stack management
jj new                   # new empty change on top of current
jj squash                # squash current into parent
jj split                 # interactively split current change
jj rebase -d main        # rebase current onto main

# Bookmarks (branches)
jj bookmark create name  # create bookmark at current change
jj bookmark set name     # move bookmark to current change
jj bookmark track name@origin

# Sync
jj git fetch             # fetch from remotes
jj git push              # push bookmarks to remote

Working with Git

  • jj repos can be colocated with git (.jj/ + .git/ side by side)
  • jj git fetch / jj git push interact with git remotes
  • Git branches appear as bookmarks in jj
  • trunk() revset typically resolves to main@origin

Key Differences from Git

  • No git add / git stage — everything is automatic
  • jj describe edits the current change's message (like git commit --amend for the message)
  • jj commit = snapshot + create new empty change (not like git commit)
  • jj new = create new empty change (not like git checkout -b)
  • Rewriting history is the norm, not the exception
  • Multiple changes can be in-progress simultaneously without stashing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment