[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7DERQ01KCRZD74HHADT7773":3,"skill-same:01M7DERQ01KCRZD74HHADT7773":56},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":6,"updatedAt":31,"install":32,"resources":45},"01M7DERQ01KCRZD74HHADT7773","jj",null,"Use when running any jj (Jujutsu) version control command — committing, describing, bookmarks, rebase, squash, restore, push, or inspecting log\u002Fdiff\u002Fstatus — and when looking up jj syntax, flags, or behavior. Invoke before free-handing jj commands from memory.","kejadlen\u002Fdotfiles","kejadlen","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F8639?v=4","01M7DEPV4SN2WBW50SBF2KG7D1","Alpha Chen","01M7DEPV5FBX0YWCBKEVHKT8E2",10,"MIT","https:\u002F\u002Fgithub.com\u002Fkejadlen\u002Fdotfiles\u002Fblob\u002Fmain\u002Fai\u002Fskills\u002Fjj\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: jj\ndescription: Use when running any jj (Jujutsu) version control command — committing, describing, bookmarks, rebase, squash, restore, push, or inspecting log\u002Fdiff\u002Fstatus — and when looking up jj syntax, flags, or behavior. Invoke before free-handing jj commands from memory.\n---\n\n# Jujutsu (jj) version control\n\nVerify behavior and flags against `jj \u003Ccommand> --help`, and read\n`pitfalls.md` before reaching for `squash`, `diff`, `show`, `file show`,\n`config get`, `tag`, `op`, filesets, `-R`, or a revset with parentheses — it\ncatalogues flags that fail silently, hang without a TTY, or make a no-op look\nlike it worked.\n\n*This is a self-improving skill. If you used it and it came up short — a missing command, flag, gotcha, or workflow — invoke the `self-improving-skills` skill and follow it before you finish.*\n\nFlags below are verified against jj 0.45.1 unless a line names another\nversion.\n\n## Naming revisions\n\n**Re-read `jj log` before reusing an ID from earlier in the session.** Any\nrewrite — yours, another workspace's, or the human's in another terminal —\ngives commits new IDs and can abandon a change outright. \"Revision `abcd`\ndoesn't exist\" means the ID went stale far more often than it means you\nmistyped it, and it is the most common jj failure there is: re-derive the ID\nrather than hunting for the typo.\n\n- Prefer change IDs, a bookmark, or `@`-relative expressions, which resolve\n  fresh. A bare commit-ID prefix is both stale-prone and ambiguous.\n- `-r main` fails when the repo has no *local* `main` — a clone often has only\n  `main@origin`, and jj's hint lists what does exist. `trunk` is the\n  paren-free alias to reach for, but it resolves out of config rather than\n  being fixed: `jj config get 'revset-aliases.\"trunk()\"'` when the repo's\n  answer matters.\n- A divergent change ID errors on its own; jj prints the offsets to use.\n\n## Core workflow\n\n### commit vs. describe vs. new\n\nThe working copy `@` is always a real commit; edits stream into it live.\nThere is no staging area, and tracking covers removals — `rm`, moves, and\nrenames are snapshotted into `@` on the next jj command. No `git rm`, no\n`git add -A`; delete the file and commit.\n\n| Command | Sets message? | Moves `@`? | Use for |\n|---|---|---|---|\n| `jj describe [-m]` | yes, on target (default `@`) | no | name or rewrite a commit's message in place |\n| `jj new \u003Crev>` | no | yes, to a new empty commit | start fresh work on top of `\u003Crev>` |\n| `jj commit -m` | yes, on `@` | yes, to a new empty commit | finish `@` and move on — `describe @` + `new` in one step |\n\n### Splitting a commit\n\n`jj split -r \u003Crev> -m 'message' \u003Cpaths>` extracts the named paths\nnon-interactively; `-m` keeps it out of `$EDITOR` when `\u003Crev>` already has a\ndescription.\n\nBy default the *selected* paths keep the original change ID and the\nremainder becomes a new child commit. To leave the original change ID and\ndescription in place and make the extracted paths the new commit, pass the\nsame revision to both `-r` and `-A`:\n\n```bash\njj split -r abcd -A abcd -m 'scope: message' path\u002Fto\u002Ffile\n```\n\nSplitting an ancestor rebases every descendant, `@` included — content\nsurvives but commit IDs change, so it's out when a commit ID has to stay put.\n\n## Absorb\n\n`jj absorb` moves each hunk of the working-copy change to the closest mutable\nancestor that last touched those lines. Hunks it can't place unambiguously\nstay put, so re-check `jj st` after; the source commit is abandoned only when\nevery hunk lands and it has no description.\n\n```bash\njj absorb                            # distribute every hunk to its ancestor\njj absorb \u003Cfileset>                  # only these paths\njj absorb --into \u003Crev>               # limit destinations to \u003Crev> and ancestors\n```\n\nWhen the hunks all belong in one specific commit, use `jj squash --into \u003Crev>\n\u003Cfileset>` instead — `pitfalls.md` covers its `--from` and `-u`\u002F`-m`\nrequirements.\n\n## Rebase\n\nWhich commits move is set by exactly one of `-b`\u002F`-s`\u002F`-r`; where they land by\nexactly one of `-o`\u002F`-A`\u002F`-B`:\n\n| Flag | Selects |\n|---|---|\n| `-b, --branch` | the whole branch relative to the destination's ancestors — jj's own gloss is that `-b=br -o=dst` equals `-s=roots(dst..br) -o=dst`. The default when none of the three is given is `-b @` |\n| `-s, --source` | the revset and all its descendants |\n| `-r, --revision` | just the revset, re-parenting its descendants onto its former parents |\n| `-o, --onto` | new parent; repeatable, so `-o p1 -o p2` makes a merge (`-d` is the older alias) |\n| `-A, --insert-after` \u002F `-B, --insert-before` | splice into the DAG at a position, rewriting neighbours |\n\nAlso useful: `--skip-emptied` drops commits a rebase makes empty,\n`--keep-divergent` stops jj abandoning a copy, `--simplify-parents` prunes\nredundant edges from a merge.\n\n**`--ignore-immutable` is a global flag, not a rebase one** — it works on\n`rebase`, `bookmark set`, `git push`, and every other rewriting command, so\n\"Commit `\u003Cid>` is immutable\" has the same override everywhere. `-b` hits it\nmost, because a branch reaches further back than you meant. Check what the\nrevset actually covers before overriding; immutability usually means you\nselected too much, not that it's in the way.\n\n## Megamerges\n\nA megamerge is bookmarked `mm` by convention, and the `jj-workspaces` skill\nuses that name when placing workspaces in the DAG. Land new work with\n`jj absorb` or `jj squash --into` so `@` stays on the merge.\n\n### Adding a new branch to the merge\n\nWork written on top of `mm` can't be pushed — its diff against trunk\ncontains every parent. Move it beneath the merge instead, so it hangs off\ntrunk and `mm` picks it up as one more parent:\n\n```bash\njj rebase -r \u003Crev> -A trunk -B mm    # one rewrite, no cleanup\n```\n\nDo it in one rewrite. `-r` always re-parents the rebased commit's descendants\nonto its former parents, so rewriting `mm` separately to add a destination\nhands `@` all of `mm`'s former parents, leaving a second near-identical\nmegamerge beside the real one. `jj rebase -r @ -o mm` repairs it.\n\n`-A trunk` means *current* trunk. When `mm`'s other parents fork from an older\ntrunk, the moved commit drags every newer trunk commit into the merge, and\nsiblings that conflict with trunk start conflicting inside `mm`. Fix that\nby rebasing the sibling onto trunk, which its PR needs anyway. Resolving\ninside `mm` hides the conflict while the PR still conflicts with main.\n\nTo add a branch that already exists, list `mm`'s parents and pass each one\nplus the new tip: `jj rebase -s mm -o \u003Cp1> -o \u003Cp2> … -o \u003Ctip>`. `-s` carries\n`@` along, and leaving a tip out of the list is how you drop a parent.\n\nThe `jj stack` alias does this for a whole branch rather than one commit,\ndefaulting to `mm+::@-` — everything between the merge and `@`. Read it with\n`jj config get aliases.stack`; `jj stack --help` doesn't work, because the\nalias shells out and the flag lands on the wrapped `jj rebase` as an empty\n`--revisions`.\n\nDon't read the result off the ASCII graph. Diff the merge as an invariant\nacross the rewrite, and list its parents explicitly:\n\n```bash\njj diff --from trunk --to mm --summary > \u002Ftmp\u002Fmm-before.txt\n# ...rewrite...\njj diff --from trunk --to mm --summary | diff \u002Ftmp\u002Fmm-before.txt -\n\njj log --no-graph -r mm -T 'parents.map(|p| p.change_id().short()).join(\"\\n\")'\n```\n\n## Bookmarks and pushing\n\n```bash\njj bookmark list                           # show all bookmarks\njj bookmark set feature -r \u003Crev>           # move bookmark to revision\njj bookmark track main --remote=origin     # start tracking a remote bookmark\n```\n\n`jj bookmark set` refuses to move a bookmark backwards or sideways\n(`-B`\u002F`--allow-backwards` overrides). That guard fires on the ordinary case of\nresetting a local bookmark onto its remote after a rewrite, so\n`jj bookmark set main -r main@origin` needs the flag; it is only a real\nwarning when you didn't expect the target to be behind.\n\nA bookmark reported \"ahead by at least N, behind by at least N\" against its\nremote is usually just a rebase, not lost work — compare the tips with\n`jj diff --from \u003Cremote> --to \u003Clocal> --stat` before assuming otherwise.\n\nA bookmark name that resolves to more than one commit errors `Name \u003Cx> is\nconflicted`; jj prints the commit IDs to disambiguate with.\n\nA git remote can't hold `foo` alongside `foo\u002F*` bookmarks, because\n`refs\u002Fheads\u002Ffoo` would be both a file and a directory. Check the remote's\nbranch names before naming an integration bookmark, and nest it instead\n(`foo\u002Fmain`).\n\nTo list what one branch has that another lacks, put `::` on both sides:\n`::main@origin ~ ::feature`. Without the leading `::`, `main@origin ~\n::feature` tests only main's tip commit and undercounts.\n\n### Advancing bookmarks after commit\n\n`jj bookmark advance` moves the nearest ancestor bookmark(s) forward — the\npreferred way to move `main` after committing on top of it.\n\n```bash\njj bookmark advance                  # advance closest bookmarks to @ (default)\njj bookmark advance main --to @-     # advance specific bookmark\n```\n\n### Pushing\n\n```bash\njj git push -b \u003Cbookmark>                  # push tracked bookmark\njj git push -c \u003Crev>                       # create auto-named bookmark and push\njj git push --named \u003Cname>=\u003Crev>           # create named bookmark and push\n```\n\nOne decision, on whether the name already exists locally. Check with\n`jj bookmark list` if you don't know:\n\n| Local bookmark | Command |\n|---|---|\n| doesn't exist yet | `jj git push --named \u003Cname>=\u003Crev>` — creates, pushes, tracks |\n| already exists | `jj git push -b \u003Cname>` — pushes, tracks if untracked |\n\nSo `jj bookmark create \u003Cname>` followed by `jj git push --named \u003Cname>=\u003Crev>`\nis always wrong: the create makes the name local, and `--named` then errors\n\"Bookmark already exists\". Pick one or the other, not both.\n\nThere is no `--allow-new` on 0.45 — reaching for it is a git habit. 0.45\nauto-tracks on `-b` instead (\"If a bookmark isn't tracking anything yet, the\nremote bookmark will be tracked automatically\"); older versions refused with\n\"Refusing to create new remote bookmark\", which is the error `--allow-new`\nlooks like it would fix. The auto-track covers only a bookmark that tracks\nnothing: on 0.46, `-b main --remote \u003Cnew>` still refuses when `main` already\ntracks another remote, so run `jj bookmark track main@\u003Cnew>` first.\n\n`-c` derives the name from the change ID (`push-\u003Cshort-change-id>`).\n`jj git push --dry-run` exists and is cheap; `jj absorb --dry-run` does not.\n\n**Push a stack bottom-first, or pass `-b \u003Cbookmark>` per branch.** A bare\n`jj git push` only considers `remote_bookmarks(remote=origin)..@`, so pushing\nthe *tip* first puts a remote bookmark below the others and drops every\nancestor bookmark out of that revset. The next bare push then reports \"No\nbookmarks\u002Ftags found in the default push revset: Nothing changed\" and\nsilently leaves the lower branch unpushed — it reads like success.\n\n## Restoring files\n\n`jj restore` uses `--from` and `--into`\u002F`--to`, not `-r`:\n\n```bash\njj restore --changes-in @                  # undo all working copy changes\njj restore SOME_FILE                       # restore file from parent\njj restore --changes-in kn FILE            # restore file in a specific revision\n```\n\n`--from` and `--into` are a source and a destination, so naming the same\nrevision for both restores a file from itself and prints \"Nothing changed.\"\nTo back a file out inside one commit, use `--changes-in \u003Crev>`.\n\n**`jj restore FILE` is not \"undo my last edit.\"** It resets the whole file\nto the parent, wiping *every* uncommitted change in it, not just the one you\nmeant to back out. Run `jj diff --git FILE` first to see what would be lost; to\nback out one surgical experiment, revert it with the tool that made it.\n\n## Divergent changes\n\nA change is divergent when it has more than one visible commit — usually\nbecause two workspaces rewrote it concurrently. jj labels these\n`(divergent)` in the log, and the edits from one side appear to have\nvanished. Don't rewrite the missing files; recover them:\n\n```bash\njj log -r 'change_id(abcd)'          # list every copy of the change\njj diff -r \u003Ccommit> --name-only      # see what each holds\njj restore --from \u003Ccommit> \u003Cpaths>   # recover\n```\n\nThere is no `divergent()` revset — on jj 0.37 it fails with \"Function\n`divergent` doesn't exist\" and suggests `merges`. Find the copies through\n`change_id(\u003Cid>)`, or spot them by the `(divergent)` label in `jj log`.\n\nA bare change ID errors once it's divergent, so use the offsets jj suggests\n(`abcd\u002F0`, `abcd\u002F1`). Offsets go by recency with the newest at `\u002F0`, so\nre-read `jj log` rather than reusing one from earlier in the session — a\nconcurrent rewrite in another workspace shifts them all down by one. For\n`jj abandon`, pass the short commit ID.\n\nNot every duplicate is litter: copies pinned by tags or another\n`immutable_heads()` clause can't be abandoned at all, so filter with\n`jj log -r 'change_id(abcd) & ~immutable()'` to see the ones you could touch.\n`jj abandon` on an already-hidden copy reports \"Skipping 1 revisions that are\nalready hidden. No revisions to abandon.\" — that is success, not a failure.\n","# Jujutsu (jj) version control\n\nVerify behavior and flags against `jj \u003Ccommand> --help`, and read\n`pitfalls.md` before reaching for `squash`, `diff`, `show`, `file show`,\n`config get`, `tag`, `op`, filesets, `-R`, or a revset with parentheses — it\ncatalogues flags that fail silently, hang without a TTY, or make a no-op look\nlike it worked.\n\n*This is a self-improving skill. If you used it and it came up short — a missing command, flag, gotcha, or workflow — invoke the `self-improving-skills` skill and follow it before you finish.*\n\nFlags below are verified against jj 0.45.1 unless a line names another\nversion.\n\n## Naming revisions\n\n**Re-read `jj log` before reusing an ID from earlier in the session.** Any\nrewrite — yours, another workspace's, or the human's in another terminal —\ngives commits new IDs and can abandon a change outright. \"Revision `abcd`\ndoesn't exist\" means the ID went stale far more often than it means you\nmistyped it, and it is the most common jj failure there is: re-derive the ID\nrather than hunting for the typo.\n\n- Prefer change IDs, a bookmark, or `@`-relative expressions, which resolve\n  fresh. A bare commit-ID prefix is both stale-prone and ambiguous.\n- `-r main` fails when the repo has no *local* `main` — a clone often has only\n  `main@origin`, and jj's hint lists what does exist. `trunk` is the\n  paren-free alias to reach for, but it resolves out of config rather than\n  being fixed: `jj config get 'revset-aliases.\"trunk()\"'` when the repo's\n  answer matters.\n- A divergent change ID errors on its own; jj prints the offsets to use.\n\n## Core workflow\n\n### commit vs. describe vs. new\n\nThe working copy `@` is always a real commit; edits stream into it live.\nThere is no staging area, and tracking covers removals — `rm`, moves, and\nrenames are snapshotted into `@` on the next jj command. No `git rm`, no\n`git add -A`; delete the file and commit.\n\n| Command | Sets message? | Moves `@`? | Use for |\n|---|---|---|---|\n| `jj describe [-m]` | yes, on target (default `@`) | no | name or rewrite a commit's message in place |\n| `jj new \u003Crev>` | no | yes, to a new empty commit | start fresh work on top of `\u003Crev>` |\n| `jj commit -m` | yes, on `@` | yes, to a new empty commit | finish `@` and move on — `describe @` + `new` in one step |\n\n### Splitting a commit\n\n`jj split -r \u003Crev> -m 'message' \u003Cpaths>` extracts the named paths\nnon-interactively; `-m` keeps it out of `$EDITOR` when `\u003Crev>` already has a\ndescription.\n\nBy default the *selected* paths keep the original change ID and the\nremainder becomes a new child commit. To leave the original change ID and\ndescription in place and make the extracted paths the new commit, pass the\nsame revision to both `-r` and `-A`:\n\n```bash\njj split -r abcd -A abcd -m 'scope: message' path\u002Fto\u002Ffile\n```\n\nSplitting an ancestor rebases every descendant, `@` included — content\nsurvives but commit IDs change, so it's out when a commit ID has to stay put.\n\n## Absorb\n\n`jj absorb` moves each hunk of the working-copy change to the closest mutable\nancestor that last touched those lines. Hunks it can't place unambiguously\nstay put, so re-check `jj st` after; the source commit is abandoned only when\nevery hunk lands and it has no description.\n\n```bash\njj absorb                            # distribute every hunk to its ancestor\njj absorb \u003Cfileset>                  # only these paths\njj absorb --into \u003Crev>               # limit destinations to \u003Crev> and ancestors\n```\n\nWhen the hunks all belong in one specific commit, use `jj squash --into \u003Crev>\n\u003Cfileset>` instead — `pitfalls.md` covers its `--from` and `-u`\u002F`-m`\nrequirements.\n\n## Rebase\n\nWhich commits move is set by exactly one of `-b`\u002F`-s`\u002F`-r`; where they land by\nexactly one of `-o`\u002F`-A`\u002F`-B`:\n\n| Flag | Selects |\n|---|---|\n| `-b, --branch` | the whole branch relative to the destination's ancestors — jj's own gloss is that `-b=br -o=dst` equals `-s=roots(dst..br) -o=dst`. The default when none of the three is given is `-b @` |\n| `-s, --source` | the revset and all its descendants |\n| `-r, --revision` | just the revset, re-parenting its descendants onto its former parents |\n| `-o, --onto` | new parent; repeatable, so `-o p1 -o p2` makes a merge (`-d` is the older alias) |\n| `-A, --insert-after` \u002F `-B, --insert-before` | splice into the DAG at a position, rewriting neighbours |\n\nAlso useful: `--skip-emptied` drops commits a rebase makes empty,\n`--keep-divergent` stops jj abandoning a copy, `--simplify-parents` prunes\nredundant edges from a merge.\n\n**`--ignore-immutable` is a global flag, not a rebase one** — it works on\n`rebase`, `bookmark set`, `git push`, and every other rewriting command, so\n\"Commit `\u003Cid>` is immutable\" has the same override everywhere. `-b` hits it\nmost, because a branch reaches further back than you meant. Check what the\nrevset actually covers before overriding; immutability usually means you\nselected too much, not that it's in the way.\n\n## Megamerges\n\nA megamerge is bookmarked `mm` by convention, and the `jj-workspaces` skill\nuses that name when placing workspaces in the DAG. Land new work with\n`jj absorb` or `jj squash --into` so `@` stays on the merge.\n\n### Adding a new branch to the merge\n\nWork written on top of `mm` can't be pushed — its diff against trunk\ncontains every parent. Move it beneath the merge instead, so it hangs off\ntrunk and `mm` picks it up as one more parent:\n\n```bash\njj rebase -r \u003Crev> -A trunk -B mm    # one rewrite, no cleanup\n```\n\nDo it in one rewrite. `-r` always re-parents the rebased commit's descendants\nonto its former parents, so rewriting `mm` separately to add a destination\nhands `@` all of `mm`'s former parents, leaving a second near-identical\nmegamerge beside the real one. `jj rebase -r @ -o mm` repairs it.\n\n`-A trunk` means *current* trunk. When `mm`'s other parents fork from an older\ntrunk, the moved commit drags every newer trunk commit into the merge, and\nsiblings that conflict with trunk start conflicting inside `mm`. Fix that\nby rebasing the sibling onto trunk, which its PR needs anyway. Resolving\ninside `mm` hides the conflict while the PR still conflicts with main.\n\nTo add a branch that already exists, list `mm`'s parents and pass each one\nplus the new tip: `jj rebase -s mm -o \u003Cp1> -o \u003Cp2> … -o \u003Ctip>`. `-s` carries\n`@` along, and leaving a tip out of the list is how you drop a parent.\n\nThe `jj stack` alias does this for a whole branch rather than one commit,\ndefaulting to `mm+::@-` — everything between the merge and `@`. Read it with\n`jj config get aliases.stack`; `jj stack --help` doesn't work, because the\nalias shells out and the flag lands on the wrapped `jj rebase` as an empty\n`--revisions`.\n\nDon't read the result off the ASCII graph. Diff the merge as an invariant\nacross the rewrite, and list its parents explicitly:\n\n```bash\njj diff --from trunk --to mm --summary > \u002Ftmp\u002Fmm-before.txt\n# ...rewrite...\njj diff --from trunk --to mm --summary | diff \u002Ftmp\u002Fmm-before.txt -\n\njj log --no-graph -r mm -T 'parents.map(|p| p.change_id().short()).join(\"\\n\")'\n```\n\n## Bookmarks and pushing\n\n```bash\njj bookmark list                           # show all bookmarks\njj bookmark set feature -r \u003Crev>           # move bookmark to revision\njj bookmark track main --remote=origin     # start tracking a remote bookmark\n```\n\n`jj bookmark set` refuses to move a bookmark backwards or sideways\n(`-B`\u002F`--allow-backwards` overrides). That guard fires on the ordinary case of\nresetting a local bookmark onto its remote after a rewrite, so\n`jj bookmark set main -r main@origin` needs the flag; it is only a real\nwarning when you didn't expect the target to be behind.\n\nA bookmark reported \"ahead by at least N, behind by at least N\" against its\nremote is usually just a rebase, not lost work — compare the tips with\n`jj diff --from \u003Cremote> --to \u003Clocal> --stat` before assuming otherwise.\n\nA bookmark name that resolves to more than one commit errors `Name \u003Cx> is\nconflicted`; jj prints the commit IDs to disambiguate with.\n\nA git remote can't hold `foo` alongside `foo\u002F*` bookmarks, because\n`refs\u002Fheads\u002Ffoo` would be both a file and a directory. Check the remote's\nbranch names before naming an integration bookmark, and nest it instead\n(`foo\u002Fmain`).\n\nTo list what one branch has that another lacks, put `::` on both sides:\n`::main@origin ~ ::feature`. Without the leading `::`, `main@origin ~\n::feature` tests only main's tip commit and undercounts.\n\n### Advancing bookmarks after commit\n\n`jj bookmark advance` moves the nearest ancestor bookmark(s) forward — the\npreferred way to move `main` after committing on top of it.\n\n```bash\njj bookmark advance                  # advance closest bookmarks to @ (default)\njj bookmark advance main --to @-     # advance specific bookmark\n```\n\n### Pushing\n\n```bash\njj git push -b \u003Cbookmark>                  # push tracked bookmark\njj git push -c \u003Crev>                       # create auto-named bookmark and push\njj git push --named \u003Cname>=\u003Crev>           # create named bookmark and push\n```\n\nOne decision, on whether the name already exists locally. Check with\n`jj bookmark list` if you don't know:\n\n| Local bookmark | Command |\n|---|---|\n| doesn't exist yet | `jj git push --named \u003Cname>=\u003Crev>` — creates, pushes, tracks |\n| already exists | `jj git push -b \u003Cname>` — pushes, tracks if untracked |\n\nSo `jj bookmark create \u003Cname>` followed by `jj git push --named \u003Cname>=\u003Crev>`\nis always wrong: the create makes the name local, and `--named` then errors\n\"Bookmark already exists\". Pick one or the other, not both.\n\nThere is no `--allow-new` on 0.45 — reaching for it is a git habit. 0.45\nauto-tracks on `-b` instead (\"If a bookmark isn't tracking anything yet, the\nremote bookmark will be tracked automatically\"); older versions refused with\n\"Refusing to create new remote bookmark\", which is the error `--allow-new`\nlooks like it would fix. The auto-track covers only a bookmark that tracks\nnothing: on 0.46, `-b main --remote \u003Cnew>` still refuses when `main` already\ntracks another remote, so run `jj bookmark track main@\u003Cnew>` first.\n\n`-c` derives the name from the change ID (`push-\u003Cshort-change-id>`).\n`jj git push --dry-run` exists and is cheap; `jj absorb --dry-run` does not.\n\n**Push a stack bottom-first, or pass `-b \u003Cbookmark>` per branch.** A bare\n`jj git push` only considers `remote_bookmarks(remote=origin)..@`, so pushing\nthe *tip* first puts a remote bookmark below the others and drops every\nancestor bookmark out of that revset. The next bare push then reports \"No\nbookmarks\u002Ftags found in the default push revset: Nothing changed\" and\nsilently leaves the lower branch unpushed — it reads like success.\n\n## Restoring files\n\n`jj restore` uses `--from` and `--into`\u002F`--to`, not `-r`:\n\n```bash\njj restore --changes-in @                  # undo all working copy changes\njj restore SOME_FILE                       # restore file from parent\njj restore --changes-in kn FILE            # restore file in a specific revision\n```\n\n`--from` and `--into` are a source and a destination, so naming the same\nrevision for both restores a file from itself and prints \"Nothing changed.\"\nTo back a file out inside one commit, use `--changes-in \u003Crev>`.\n\n**`jj restore FILE` is not \"undo my last edit.\"** It resets the whole file\nto the parent, wiping *every* uncommitted change in it, not just the one you\nmeant to back out. Run `jj diff --git FILE` first to see what would be lost; to\nback out one surgical experiment, revert it with the tool that made it.\n\n## Divergent changes\n\nA change is divergent when it has more than one visible commit — usually\nbecause two workspaces rewrote it concurrently. jj labels these\n`(divergent)` in the log, and the edits from one side appear to have\nvanished. Don't rewrite the missing files; recover them:\n\n```bash\njj log -r 'change_id(abcd)'          # list every copy of the change\njj diff -r \u003Ccommit> --name-only      # see what each holds\njj restore --from \u003Ccommit> \u003Cpaths>   # recover\n```\n\nThere is no `divergent()` revset — on jj 0.37 it fails with \"Function\n`divergent` doesn't exist\" and suggests `merges`. Find the copies through\n`change_id(\u003Cid>)`, or spot them by the `(divergent)` label in `jj log`.\n\nA bare change ID errors once it's divergent, so use the offsets jj suggests\n(`abcd\u002F0`, `abcd\u002F1`). Offsets go by recency with the newest at `\u002F0`, so\nre-read `jj log` rather than reusing one from earlier in the session — a\nconcurrent rewrite in another workspace shifts them all down by one. For\n`jj abandon`, pass the short commit ID.\n\nNot every duplicate is litter: copies pinned by tags or another\n`immutable_heads()` clause can't be abandoned at all, so filter with\n`jj log -r 'change_id(abcd) & ~immutable()'` to see the ones you could touch.\n`jj abandon` on an already-hidden copy reports \"Skipping 1 revisions that are\nalready hidden. No revisions to abandon.\" — that is success, not a failure.\n",{"name":5,"description":7},"main","54400d2fb3ebb925baf35311c647aaa31e7a5222","ai\u002Fskills\u002Fjj",0,"https:\u002F\u002Fgithub.com\u002Fkejadlen\u002Fdotfiles","https:\u002F\u002Fgithub.com\u002Fkejadlen","https:\u002F\u002Fkejadlen.dev","2026-11-14 03:39:37",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add kejadlen\u002Fdotfiles --skill jj",{"tool":38,"command":39},"bunx","bunx skills add kejadlen\u002Fdotfiles --skill jj",{"tool":41,"command":42},"pnpm","pnpm dlx skills add kejadlen\u002Fdotfiles --skill jj","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fkejadlen\u002Fdotfiles\u002Fblob\u002Fmain\u002Fai\u002Fskills\u002Fjj\u002FSKILL.md",true,[46,52],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"evals.yml","REFERENCE","参考文档",7261,"https:\u002F\u002Fgithub.com\u002Fkejadlen\u002Fdotfiles\u002Fblob\u002Fmain\u002Fai\u002Fskills\u002Fjj\u002Fevals.yml",{"path":53,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":54,"sourceHtmlUrl":55},"pitfalls.md",9634,"https:\u002F\u002Fgithub.com\u002Fkejadlen\u002Fdotfiles\u002Fblob\u002Fmain\u002Fai\u002Fskills\u002Fjj\u002Fpitfalls.md",[57,64,71,78,85,92],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":19},"01M7DEVM19CB8GSCZV56PHA594","zoekt","Use when searching code across repositories — prefer zoekt over grep\u002Fripgrep for indexed code search. Covers indexing repos, search syntax, and query patterns.","https:\u002F\u002Fgithub.com\u002Fkejadlen\u002Fdotfiles\u002Fblob\u002Fmain\u002Fai\u002Fskills\u002Fzoekt\u002FSKILL.md",[],[],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":19},"01M7DEVF10JKR56RSX30PZ8BNH","writing-for-accessibility","Use when writing documentation, alt text, diagrams, or any content that should be accessible to people with disabilities. Covers alt text, color contrast, inclusive language, and accessible visuals. Also use when reviewing documents for accessibility.","https:\u002F\u002Fgithub.com\u002Fkejadlen\u002Fdotfiles\u002Fblob\u002Fmain\u002Fai\u002Fskills\u002Fwriting-for-accessibility\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M7DEVA0Q63VMQWG32VN18XYB","writing-error-messages","Use when writing, reviewing, or improving error messages in code, CLI tools, APIs, or UIs. Covers identifying the cause, explaining the fix, and setting the right tone. Also use when error messages are vague, unactionable, or confusing.","https:\u002F\u002Fgithub.com\u002Fkejadlen\u002Fdotfiles\u002Fblob\u002Fmain\u002Fai\u002Fskills\u002Fwriting-error-messages\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M7DEV6GGF2H3FW3YCPWXRRT6","working-in-the-open","Use when making design decisions during implementation — routes rationale to the right venue (commits, task comments, code comments, or documentation) based on how durable the context needs to be","https:\u002F\u002Fgithub.com\u002Fkejadlen\u002Fdotfiles\u002Fblob\u002Fmain\u002Fai\u002Fskills\u002Fworking-in-the-open\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M7DEV2XTM37B9S0QV8X9SNSW","web-standards","Use when writing or reviewing HTML, CSS, or browser JavaScript — covers semantic markup, native platform features over libraries, Baseline browser support, accessibility and APCA contrast, and optional validation with vnu, axe, and Lighthouse","https:\u002F\u002Fgithub.com\u002Fkejadlen\u002Fdotfiles\u002Fblob\u002Fmain\u002Fai\u002Fskills\u002Fweb-standards\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":19},"01M7DETYVQNPNGXC094DT0PTDF","web-design","Use when designing or building web UI, frontends, or styling — covers personal web design preferences, fluid layout, and Alpine.js","https:\u002F\u002Fgithub.com\u002Fkejadlen\u002Fdotfiles\u002Fblob\u002Fmain\u002Fai\u002Fskills\u002Fweb-design\u002FSKILL.md",[],[]]