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 (Read This First!)
Before diving into commands, understand the key difference:
In Git:
Edit files → git add → git commit(staging area prepares for future commit)In JJ:
Edit files → (changes automatically in commit)jj new → (start next commit)Your working copy IS a commit, not a staging area preparing for one. When you edit files, you’re editing the commit directly. No git add needed—everything is automatic.
This feels strange for the first few hours. Then it clicks, and you’ll wonder how you tolerated Git’s complexity. Give it time.
Want deeper explanation? Read the Mental Model guide after finishing this quickstart.
Your First Commands
After installing LazyJJ, try these commands in any JJ repository:
# Check status (shortcut: jj st)jj status
# View recent history (shortcut: jj l)jj log-short
# View changes (shortcut: jj d)jj 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
# Navigate to the bottomjj stack-bottom
# 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
The Learning Curve (It’s Worth It)
Research across 20+ guides shows a consistent pattern:
- Minutes 1-30: Confusion (“Where’s
git add?”) - Hours 1-4: Awkwardness (muscle memory fights you)
- Hours 4-8: The “click” (suddenly it makes sense)
- After 8 hours: “I’ll never go back to Git”
One developer: “I became comfortable enough with jj to replace git entirely in one day.”
Don’t fight the model. Let it feel strange for a few hours. Your Git habits will adapt.
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
Give yourself 4-8 hours with JJ. The “aha moment” is real, and it’s worth the initial learning curve.
Ernesto Jiménez