Loading...
Loading...
Use jj (Jujutsu) for local version control instead of git. Activate when: the repo has a .jj/ directory, the user or project config mentions jj, the user says 'use jj', or any version control operation is needed in a jj-managed repo. Also use this skill when the user asks to commit, branch, stash, rebase, or perform any git-like operation in a repo that uses jj. If unsure whether the repo uses jj, check for a .jj/ directory.
npx skill4agent add onevcat/skills onevcat-jjgit addjj newjj edit# If .jj/ exists, use jj commands — not git commands
test -d .jj && echo "jj repo".jj/.git/.git/.jj/jj git init --colocatejj bookmark track master@origin # Track a specific remote branchjj log # Show change graph + status (replaces git log + git status)
jj diff # Show diff of current change vs parent
jj diff -r <change> # Show diff of a specific changejj log@kxryzmspkxkxryzmspjj describe -m "feat: add auth module" # Set/update description of current change
jj describe -r <change> -m "new msg" # Update description of any change
jj new # Finish current change, start a new empty one
jj new <change> # Start new work branching from a specific change
jj commit -m "feat: ..." # Shorthand: describe current + start new (equivalent to describe + new)
jj edit <change> # Jump to an existing change and continue editing it
jj abandon # Discard the current change entirely
jj abandon <change> # Discard a specific changejj newjj abandonjj editjj editjj split # Interactively split current change into two (or more)
jj split -r <change> # Split a specific change
jj rebase -s <source> -d <destination> # Move a change (and its descendants) to a new parent
jj rebase -d <destination> # Rebase current branch onto destination
jj undo # Undo the last jj operation (any operation)
jj op log # View operation-level history
jj op restore <operation-id> # Restore repo to any previous operation statejj splitjj undojj git fetch # Fetch from remote (like git fetch)
jj rebase -d master # Rebase current work onto latest master
jj bookmark track master@origin # Track a remote branch (needed after init or for new remotes)
jj bookmark create my-feature -r @ # Create a bookmark (= git branch) pointing at current change
jj bookmark create my-feature -r <chg> # Create a bookmark pointing at a specific change
jj bookmark set my-feature -r <change> # Move an existing bookmark to a different change
jj git push # Push all changed bookmarks to remote
jj git push --bookmark my-feature # Push only a specific bookmark
jj git push --deleted # Push bookmark deletions to remote (after jj abandon)mastermainjj logjj git init --colocatejj bookmark track <name>@<remote>jj bookmark create <name> -r <change>jj git push--bookmark <name>jj abandonjj git push --deletedjj workspace add ../workspace-name # Create a parallel workspace (like git worktree)jj new <change1> <change2> ...jj newjj new
jj describe -m "feat: implement avatar upload"
# start working...jj new master # Branch off master for the urgent fix
# ... do the fix ...
jj describe -m "fix: critical auth bug"
jj edit <previous-change> # Jump back to where you were
# ... resume previous work ...jj split # Interactive: pick files/hunks for first change, rest goes to second
jj split # Split again if neededjj undojj commit -m "refactor: extract auth module"
jj commit -m "feat: add token refresh logic"
jj commit -m "test: update auth tests"
jj commit -m "docs: update API documentation"jj edit <first-change> # Jump to first skeleton change
# ... implement ...
jj edit <next-change> # Jump to next (previous work auto-rebases descendants)
# ... implement ...-mjj undo # Undo last operation, no questions asked
jj op log # See full operation history if you need to go further back
jj op restore <op-id> # Jump to any point in operation historyjj undogit addgit commitgit stashgit checkoutjj editjj new <change>jj undojj op restore| Task | jj command |
|---|---|
| Initialize in existing git repo | |
| See what's going on | |
| Describe current change | |
| Start next task | |
| Branch from specific change | |
| Edit an older change | |
| Discard a change | |
| Split a change | |
| Undo anything | |
| Fetch remote | |
| Track a remote branch | |
| Rebase onto master | |
| Create bookmark for push | |
| Move existing bookmark | |
| Push to remote | |
| Push specific bookmark | |
| Push bookmark deletions | |
| Merge multiple changes | |
| Parallel workspace | |
jj help # List all commands
jj help <command> # Detailed help for a specific command
jj help -k <keyword> # Search help by keywordjj help