Skip to content

Git → JJ Quick Reference

If you’re coming from Git, this page is your quick reference for the differences that matter most. For the full conceptual explanation, see the Mental Model guide.

Command Comparison

GitJJNotes
git statusjj statusSame concept
git diffjj diffSame concept
git logjj logJJ shows graph by default
git add && git commitjj describe && jj newNo staging needed
git commit --amend(automatic)Working copy always amends
git checkout -bjj newBranches optional
git checkoutjj editEdit any commit
git rebase -ijj rebase / jj squashSimpler commands
git stash(not needed)Just jj new
git cherry-pickjj duplicateCopy commits
git reset --hardjj undoSafer recovery

Key Differences

ConceptGitJJ
Working copyPrepares a future commitIs the commit
Staging areaExplicit git addNone — automatic
CommitsImmutableMutable by default
BranchesRequired, auto-followOptional “bookmarks,” manual
ConflictsBlock workflowFirst-class data — details
UndoLimited git reflogFull operation log
History editingDangerous rebase -iSafe — descendants rebase automatically

The Operation Log vs Git Reflog

Git ReflogJJ Operation Log
Tracks HEAD movements onlyTracks every repository change
Separate reflog per branchOne unified history
Entries expire (90 days)Permanent history
Hard to understandClear command history
Can’t restore complex statesFull state restoration

See the Operation Log guide for the full reference.

Revsets for Querying History

JJ has a powerful query language called “revsets” for selecting commits:

Terminal window
jj log -r "trunk..@" # Commits between trunk and here
jj log -r "mine()" # Your commits
jj log -r "stack" # Current stack (LazyJJ alias)
jj rebase -s "stack" -d trunk # Rebase entire stack

Common Git User Confusions

“Where’s git stash?” → Not needed. Your current commit already has your work. Just jj edit <other-commit> to switch contexts. Return with jj edit <original> and your work is still there.

“How do I stage files?” → You don’t. Working copy is the commit. Files are automatically included. To split changes later, use jj split.

“Why didn’t my bookmark move?” → JJ bookmarks don’t auto-follow like Git branches. You must manually jj bookmark set <name>. See Common Mistakes for details.

“How do I amend a commit?” → Just edit files. Your working copy always amends the current commit. To edit an older commit, use jj edit <change-id>.

Next Steps

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