| name | jujutsu |
|---|---|
| description | Use when working with version control in a repository that contains `.jj/`, when the user explicitly mentions Jujutsu or `jj`, or when any Git or VCS task is in scope — check for `.jj/` in the working directory when in doubt, and apply this skill if found instead of defaulting to plain Git assumptions. |
Use this skill to keep VCS behavior accurate in jj repositories. Prefer jj for mutations, history editing, bookmarks, workspaces, and recovery. In colocated repositories, Git is still available, but do not default to Git mental models.
Validated against jj 0.39.0 on 2026-03-12 using jj/docs/, jj/cli/docs/, and the v0.38.0 and v0.39.0 release notes.
- Check whether the current directory or an ancestor contains
.jj/. - If yes, treat the repo as a jj repo and use this skill even if the user asked for generic Git help.
- If
.jj/and.git/both exist, explicitly describe it as a colocated workspace. - If only
.jj/is present, still preferjj; Git interop may exist behind the scenes, but the workspace is not colocated. - If
.jj/is absent, answer as plain Git. Do not append jj comparisons, translations, or "in jj..." sidebars unless the user explicitly asked for jj or for a Git-vs-jj comparison.
| If you reach for Git... | Prefer in jj | Notes |
|---|---|---|
git status |
jj st |
Working copy state and current commit. |
git log |
jj log |
Use revsets instead of Git revision syntax. |
git diff |
jj diff |
Diff the working-copy commit. |
git checkout <rev> |
jj edit <rev> |
Switch the working copy to another revision. |
git commit --amend |
keep editing @, or jj squash |
The working copy is already a commit. |
git commit for a new step |
jj new, then jj desc -m "..." |
Start a fresh working-copy commit. |
git branch |
jj bookmark |
Bookmarks are the Git-facing movable names. |
git rebase |
jj rebase |
jj rebases descendants automatically after rewrites. |
git reflog |
jj op log |
Repository-wide operation history. |
git reset --hard for recovery |
jj undo, jj restore, jj op restore |
Prefer reversible recovery tools. |
git worktree |
jj workspace |
Workspaces are the jj-native multi-working-copy model. |
git fetch |
jj git fetch |
Use jj for remote sync unless a Git-only action is needed. |
git push |
jj git push --bookmark <name> |
Ensure the bookmark points where you intend. |
HEAD^ / HEAD~1 |
@- |
Parent of the working-copy commit. |
HEAD~N (N dashes) |
@--, @---, … |
Repeat - for each ancestor; @~N is not jj syntax. |
main..HEAD (range) |
main::@ |
jj uses :: for ranges, not .. or .... |
- Inspect first with
jj stand usuallyjj log. - Prefer non-interactive commands in agent contexts. Use
-mwhen available, and avoid editor or TUI flows unless the task explicitly allows them. - Prefer change IDs over commit IDs when selecting revisions.
- Never write
@~Nfor ancestors — that is Git syntax applied to a jj symbol and is not valid. Use@-(one ancestor),@--(two),@---(three), and so on. - Never write
x..yorx...yfor ranges — usex::y(jj inclusive range syntax). - Prefer
jjfor mutations even in colocated workspaces. - When both
.jj/and.git/exist, use the wordcolocateddirectly instead of implying it indirectly. - Use Git mainly for read-only inspection or for an explicitly Git-specific workflow that jj documentation says is safe.
- Treat
jj workspaceas the first answer to "use a worktree". - Reach for
jj undoandjj op logbefore destructive recovery ideas.
- For the jj mental model and revset basics, read
references/core-concepts.md. - For common agent workflows, read
references/operational-guide.md. - For Git interop and when Git is acceptable, read
references/git-interop.md. - For workspaces and stale working copies, read
references/workspaces.md. - For release targeting and refresh rules, read
references/version-notes.md.
Before changing this skill for a newer jj release:
- check the local
jj --versionoutput if available - review release notes newer than
0.39.0 - update
references/version-notes.md - adjust command guidance only after confirming docs or release notes
If the installed jj is older than 0.39.0, treat command examples as baseline guidance rather than guaranteed syntax and verify drift-prone commands with jj help ... before relying on them. If the installed jj is newer than 0.39.0, review newer release notes before assuming the skill is fully current.