| name | jj-vcs-comprehensive |
| description | Complete Jujutsu (jj) version control system for Git replacement. Use when migrating from Git, setting up colocated workspaces, managing commits without staging, working with bookmarks/branches, syncing with GitHub/remotes, resolving conflicts, or any jj command operations. |
Jujutsu (JJ) Version Control
Complete Git replacement with automatic commit tracking and simplified workflows.
When to Apply
- Migrating from Git to jj while maintaining GitHub sync
- Setting up colocated Git/jj workspaces for tool compatibility
- Managing commits without staging area complexity
- Working with bookmarks (branches) and remote synchronization
- Resolving merge conflicts as first-class objects
Critical Rules
Colocated Workspaces: Always use --colocate for Git tool compatibility
jj git init myproject
jj git init --colocate myproject
jj git clone --colocate https://github.com/user/repo
Working Copy as Commit: Changes automatically tracked without staging
git add file.rs
git commit -m "message"
echo "code" > file.rs
jj describe -m "Add feature"
jj new
Bookmarks vs Branches: Use bookmark commands for Git branch equivalents
jj branch create feature
jj bookmark create feature-auth
jj bookmark track main --remote origin
Key Patterns
Repository Setup
jj git clone --colocate https://github.com/user/repo
cd repo
cd existing-git-repo
jj git init --colocate
jj git colocation status
Daily Workflow
jj status
jj diff
jj describe -m "Implement authentication"
jj log
jj log -r 'main::@'
jj new
jj new main
jj new -r "trunk()"
Bookmark Management
jj bookmark create feature-branch
jj bookmark create ui-update -r <commit-id>
jj bookmark track main --remote origin
jj bookmark list --all-remotes
jj bookmark move feature-branch --to @
jj bookmark delete old-feature
jj bookmark rename old-name new-name
Remote Synchronization
jj git remote add origin https://github.com/user/repo.git
jj git remote list
jj git fetch
jj git fetch --remote upstream
jj git push --bookmark feature-branch --allow-new
jj git push --all
jj git fetch
jj rebase -b my-feature -d main@origin
jj git push --bookmark my-feature
Conflict Resolution
jj new main feature-branch
jj status
jj log -r 'conflict()'
jj resolve
jj resolve src/file.rs
jj new conflicted-commit
jj squash
Advanced Operations
jj rebase -s source-commit -d destination-commit
jj rebase -b bookmark-name -d main
jj split file1.rs file2.rs
jj squash file3.rs
jj squash -i
jj edit <commit-id>
jj log -r 'author("alice") & committer_date(after:"2024-01")'
jj log -r 'description(glob:"fix*") ~ author("bot")'
jj log -r 'mutable() & empty()'
Git Compatibility
git status
git log
jj log
jj git import
jj git export
jj git colocation disable
jj git colocation enable
Common Mistakes
- Using Git staging concepts: jj has no staging area - changes are automatically tracked in working copy commit
- Forgetting to track remote bookmarks: Use
jj bookmark track <name> --remote origin for push/pull workflows
- Not using
--colocate: Required for Git tool compatibility and GitHub workflows
- Expecting
git pull equivalent: Use jj git fetch followed by jj rebase -b branch -d main@origin
- Creating commits without descriptions: Use
jj describe -m "message" to set commit messages
- Mixing
new and commit: jj new starts a new empty change on top; jj commit is shorthand for jj describe + jj new — it finalizes the current change with a message and starts a new one. Neither is a Git-sync command; use jj git fetch/jj git push for that.