Skip to content

Repository files navigation

Jujutsu (jj) Cheat Sheet

A comprehensive, modern reference for Jujutsu VCS - a powerful Git-compatible version control system that's both simple and powerful.

What is Jujutsu?

Jujutsu (jj) is a next-generation version control system that combines the best of Git and Mercurial while fixing many pain points of traditional VCS. It's fully Git-compatible, meaning you can use it on any Git repository without migration.

Key Features

  • Working copy as a commit - No staging area; changes are automatically tracked
  • Change-based model - Work with mutable changes instead of immutable commits
  • Automatic rebasing - Descendants are automatically rebased when you modify history
  • First-class conflicts - Conflicts don't block operations; resolve them when ready
  • Powerful undo - Every operation can be undone with jj undo
  • Git compatible - Use with any Git repository and remote

Who Uses Jujutsu?

  • Google uses it internally
  • Growing open-source community
  • Developers frustrated with Git's complexity

Quick Start

# Install (see Installation.md for more options)
cargo install --git https://github.com/jj-vcs/jj jj-cli

# Initialize in an existing Git repo (colocated mode)
jj git init --colocate

# Or clone a new repository
jj git clone --colocate https://github.com/user/repo

# See what's happening
jj status
jj log

# Make changes and commit
jj new -m "Your change description"
# Edit files...
jj squash  # Move changes into the description you created

# Push to remote
jj git push

🚀 Quick Workflow Guide

Managing multiple Git repo clones? (e.g., my-api_01, my-api_02, ... my-api_06)

See Workflow Cheat Sheet to learn how Jujutsu replaces 6 repository clones with a single repo and makes feature juggling trivial. No more:

  • Searching for a "free" clone
  • Stashing or WIP commits to switch features
  • Forgetting which clone has which feature
  • Wasting disk space on duplicate repos

One repo. Infinite parallel features. Instant context switching.

Documentation Structure

This repository contains comprehensive documentation organized by topic:

Getting Started

Command Reference

Workflows & Patterns

Configuration & Customization

Help & Resources

Why Switch to Jujutsu?

From Git's Perspective

Git Pain Point Jujutsu Solution
Complex staging area No staging; working copy is always a commit
Confusing rebase conflicts Conflicts don't block operations
Fear of rewriting history Automatic rebasing + powerful undo
Detached HEAD state Always on a change, never "detached"
Lost commits Operation log tracks everything
Merge conflict hell First-class conflict representation

Jujutsu's Philosophy

  1. Safety first - Operations are logged and can be undone
  2. No hidden state - Everything is explicit and visible
  3. Flexibility - Mutable changes until pushed
  4. Simplicity - Consistent, predictable commands
  5. Git compatibility - Works seamlessly with Git infrastructure

Quick Command Reference

Daily Workflow

jj status                    # Show working copy status
jj log                       # View commit history
jj new -m "Description"      # Start a new change
jj squash                    # Move changes into parent
jj bookmark create <name>    # Create a bookmark (branch)
jj git push                  # Push to remote

Navigation

jj log                       # View history
jj show                      # Show current change
jj edit <revision>           # Switch to a different change
jj next                      # Move to child revision
jj prev                      # Move to parent revision

Modification

jj describe                  # Edit current change description
jj split                     # Split change into multiple
jj squash                    # Squash change into parent
jj absorb                    # Automatically distribute changes
jj rebase -d <dest>          # Rebase to new parent

Safety & Exploration

jj undo                      # Undo last operation
jj op log                    # View operation history
jj op restore <id>           # Restore to specific operation
jj abandon                   # Abandon a change

Learning Path

  1. Start Here: Read Getting Started and Core Concepts
  2. If you know Git: Review Git Comparison for command equivalents
  3. Daily Usage: Bookmark Commands Reference and Workflows
  4. Level Up: Explore Advanced Features and Best Practices
  5. Configure: Customize your setup with Configuration

Contributing

This is a living document. Contributions, corrections, and suggestions are welcome!

License

This documentation is provided as-is for the community. Jujutsu itself is licensed under Apache 2.0.

Quick Links


Last Updated: 2025-10-15 Jujutsu Version: Latest (compatible with v0.15+)

About

personal jj-cheatsheet

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors