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:
# Check statusjj status
# View recent historyjj log-short
# View changesjj diffCreating Commits
# Create a new commitjj new -m "Add awesome feature"
# Edit your changesvim src/feature.js
# View themjj 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 commitjj 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:
| Revset | Meaning | Example Use |
|---|---|---|
@ | Current commit (where you are now) | jj diff -r @ |
@- | Parent of current commit | jj new @- (new commit from parent) |
@+ | Child of current commit (if only one) | jj edit @+ |
main..@ | Commits between main and current | jj log -r "main..@" |
stack | Your current stack (LazyJJ alias) | jj log -r stack |
Examples:
# See commits in your current stackjj log -r stack
# Diff against mainjj diff -r "main..@"
# Create new commit from parentjj new @-
# See what's in current commitjj 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:
# View your current stackjj stack-view
# Navigate to the top of your stackjj stack-top
# Sync your stack with the latest trunkjj stack-syncStarting Fresh
# Fetch latest and start from trunkjj stack-startViewing All Your Work
# View all your stacks (all mutable commits you own)jj stacks-allGitHub Workflow
If you have GitHub CLI (gh) installed:
# View current PRjj pr-view
# Open PR in browserjj pr-open
# Create/update stacked PRsjj pr-stack-createExperimentation is Safe
Made a mistake? Undo it:
jj undoEverything 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.
# See your operation historyjj op log
# Restore to any previous statejj op restore <operation-id>Learn more: Operation Log guide
Common Beginner Mistakes
Avoid these pitfalls during your first few hours:
-
Don’t use
gitcommands - Usejjequivalents. Git doesn’t understand JJ’s operation log. Details -
Bookmarks don’t auto-follow - Unlike Git branches, you must manually move bookmarks with
jj bookmark set. Details -
Use
jj newto finalize commits -jj describejust sets the message. Usejj newto start the next commit. Details -
Trust
jj undo- Experiment freely. The operation log makes everything reversible. Details
Full list: Common Mistakes guide
Next Steps
Essential Reading (10 minutes)
- Mental Model - Understand why JJ works this way
- Operation Log - Your safety net explained
- Common Mistakes - Avoid frustration
Learn the Workflow (30 minutes)
- Create a Stack - Build stacked PRs
- Navigate Stacks - Move between commits
- Edit Mid-Stack - JJ’s killer feature
Reference Material
- All Aliases - Command shortcuts
- Stack Commands - Complete stack workflow
- Advanced Revsets - Complex queries
Integrations
- GitHub Integration - Stacked PRs
- Claude Integration - AI-assisted development
Ernesto Jiménez