Skip to content

Quick Start

This guide will get you productive with LazyJJ in 5 minutes. Mastering the mental model takes 4-8 hours, but it’s worth it—JJ makes version control finally make sense.

Understanding JJ’s Model

Your working copy IS a commit. When you edit files, you’re editing the commit directly—no git add, no staging area. Use jj new to seal the current commit and start the next one. Read the Mental Model guide for the full explanation.


Your First Commands

After installing LazyJJ, try these commands in any JJ repository:

Terminal window
# Check status
jj status
# View recent history
jj log-short
# View changes
jj diff

Creating Commits

Terminal window
# Create a new commit
jj new -m "Add awesome feature"
# Edit your changes
vim src/feature.js
# View them
jj diff
# ✨ Notice: No `git add` needed!
# Your changes are automatically part of the commit
# Describe your commit (you can do this multiple times)
jj describe -m "Add awesome feature
- Implement core logic
- Add error handling"
# Create next commit
jj new -m "Add tests"

Key insight: jj new seals the current commit and starts a fresh one. Think of it as “finalize and move to next.”


Basic Revsets You’ll Use Daily

Revsets are JJ’s query language for selecting commits. You’ll use these constantly:

RevsetMeaningExample Use
@Current commit (where you are now)jj diff -r @
@-Parent of current commitjj new @- (new commit from parent)
@+Child of current commit (if only one)jj edit @+
main..@Commits between main and currentjj log -r "main..@"
stackYour current stack (LazyJJ alias)jj log -r stack

Examples:

Terminal window
# See commits in your current stack
jj log -r stack
# Diff against main
jj diff -r "main..@"
# Create new commit from parent
jj new @-
# See what's in current commit
jj diff -r @

Need more complex queries? See Advanced Revsets.


Working with Stacks

A “stack” is the series of commits from trunk to your current position:

Terminal window
# View your current stack
jj stack-view
# Navigate to the top of your stack
jj stack-top
# Sync your stack with the latest trunk
jj stack-sync

Starting Fresh

Terminal window
# Fetch latest and start from trunk
jj stack-start

Viewing All Your Work

Terminal window
# View all your stacks (all mutable commits you own)
jj stacks-all

GitHub Workflow

If you have GitHub CLI (gh) installed:

Terminal window
# View current PR
jj pr-view
# Open PR in browser
jj pr-open
# Create/update stacked PRs
jj pr-stack-create

Experimentation is Safe

Made a mistake? Undo it:

Terminal window
jj undo

Everything in JJ is recorded in the operation log. You can undo any operation. This makes JJ one of the safest version control systems ever created.

Terminal window
# See your operation history
jj op log
# Restore to any previous state
jj op restore <operation-id>

Learn more: Operation Log guide


Common Beginner Mistakes

Avoid these pitfalls during your first few hours:

  1. Don’t use git commands - Use jj equivalents. Git doesn’t understand JJ’s operation log. Details

  2. Bookmarks don’t auto-follow - Unlike Git branches, you must manually move bookmarks with jj bookmark set. Details

  3. Use jj new to finalize commits - jj describe just sets the message. Use jj new to start the next commit. Details

  4. Trust jj undo - Experiment freely. The operation log makes everything reversible. Details

Full list: Common Mistakes guide


Next Steps

Essential Reading (10 minutes)

Learn the Workflow (30 minutes)

Reference Material

Integrations

Project by Ernesto Jiménez Ernesto Jiménez Bluesky GitHub