| name | jujutsu |
| description | Track changes, rebase modifications, resolve conflicts, and manage bookmarks with Jujutsu (jj). Use when committing changes, navigating history, squashing/splitting commits, or pushing to Git remotes. |
Jujutsu Cheatsheet
Jujutsu (JJ) is a Git-compatible VCS with a focus on concurrent development and
ease of use.
Key Commands
| Command | Description |
|---|
jj st | Show working copy status |
jj log | Show change log |
jj diff | Show changes in working copy |
jj new | Create new change |
jj desc | Edit change description |
jj squash | Move changes to parent |
jj split | Split current change |
jj rebase -s src -d dest | Rebase changes |
jj absorb | Move changes into stack of mutable revisions |
jj bisect | Find bad revision by bisection |
jj fix | Update files with formatting fixes |
jj sign | Cryptographically sign a revision |
jj metaedit | Modify metadata without changing content |
Project Setup
jj git init
jj git init --colocate
Basic Workflow
jj new
jj desc -m "feat: add feature"
jj log
jj edit change-id
jj new --before @
jj edit @-
Time Travel
jj edit change-id
jj next --edit
jj edit @-
jj new --before @ -m msg
Merging & Rebasing
jj new x yz -m msg
jj rebase -s src -d dest
jj abandon
Conflicts
jj resolve
Templates & Revsets
jj log -T 'commit_id ++ "\n" ++ description'
jj log -r 'heads(all())'
jj log -r 'remote_bookmarks()..'
jj log -r 'author(name)'
Git Interop
jj bookmark create main -r @
jj git push --bookmark main
jj git fetch
jj bookmark track main@origin
Advanced Commands
jj absorb
jj bisect start
jj bisect good
jj bisect bad
jj fix
jj sign -r @
jj metaedit -r @ -m "new message"
Tips
- No staging: changes are immediate
- Use conventional commits:
type(scope): desc
jj undo to revert operations
jj op log to see operation history
- Bookmarks are like branches
- Concurrent development encouraged
jj absorb is powerful for fixing up commits in a stack