Jujutsu (jj) Version Control
Use jj instead of git for all version control operations.
Run jj --help for the authoritative command reference and
jj <command> --help for current flags and options. Never rely on this
skill as authoritative — verify behavior with --help.
Making Commits
No staging area — files are automatically tracked. Edit files and commit.
# Describe current change
jj describe -m "Add feature X"
# Finalize current change and start a new empty one
jj commit -m "Add feature X"
# Start new change on top of current
jj new -m "Next task"
# Start new change on main
jj new main -m "Start feature"
Key Differences from Git
@= working copy (current change)@-= parent of working copy- Changes auto-amend — editing files updates the current change
jj squashmoves changes into parent (likegit commit --amend)jj squash -ifor interactive selection
Showing Diffs
jj show does not accept path arguments. Use jj diff instead:
jj diff -r @- # all changes in parent
jj diff -r @- path/to/file # specific file
jj diff -- 'glob:"bin/*" ~ glob:"bin/,special"' # fileset expression
Advancing Bookmarks
After jj commit, advance the nearest ancestor bookmark forward:
jj bookmark advance # advance closest bookmark(s) to @
Run jj bookmark advance --help for --to and other options.
Quick Reference
| Task | Command |
|---|---|
| Set commit message | jj describe -m "message" |
| Finalize and continue | jj commit -m "message" |
| Start new change | jj new or jj new main |
| Amend into parent | jj squash |
| View status | jj st |
| View log | jj log |
| View diff | jj diff -r <rev> |
| Advance bookmark | jj bookmark advance |
| Push to remote | jj git push --change @ |
| Undo last operation | jj undo |
References
For detailed guidance, read references/ files:
git-to-jj-commands.md— Comprehensive Git → jj command mappinggit-comparison.md— Conceptual differences from Gitworking-copy.md— How automatic commits workbookmarks.md— Managing bookmarks (branches)github.md— Fork workflows and PRsconflicts.md— Conflict resolutionoperation-log.md— Undo and operation historyrevsets.md— Query syntax (@,@-,main..@, etc.)config.md— Configuration optionstutorial.md— Step-by-step introductiondivergence.md— Handling divergent changesmultiple-remotes.md— Multi-remote setupsgit-compatibility.md— Colocated repos and Git interop
Converted and distributed by TomeVault — claim your Tome and manage your conversions.