{
  "slug": "jj-file-edit-and-delete-modify-files-in-any-revision-fe96070ab338",
  "title": "jj file edit and delete modify files in any revision",
  "tools": [
    "jj"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-10-07T21:28:17.000Z",
  "announced_at": "2026-10-07T21:28:17.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When editing or deleting a file in a revision, use `jj file edit` or `jj file delete` with the target path; both default to revision `@`, and descendants are rebased after the commit is rewritten.",
    "examples": [
      "jj file edit --revision <REVSET> <FILE>",
      "jj file delete --revision <REVSET> <FILESET>"
    ],
    "gotchas": [
      "Version: v0.46.0",
      "edit: --revision, -r <REVSET>: Revision to edit; defaults to `@`.",
      "edit: --restore-descendants: Preserve descendants' content, rather than their diff, when rebasing.",
      "edit: <FILE> (required): File to edit; a new file is created if it does not exist in the revision.",
      "delete: --revision, -r <REVSET>: Revision to delete files from; defaults to `@`.",
      "delete: --restore-descendants: Preserve descendants' content, rather than their diff, when rebasing.",
      "delete: <FILESETS> (required): One or more file or directory paths to delete; filesets are accepted.",
      "The commands operate on files in any revision and do not require changing the working copy."
    ]
  },
  "why_it_matters": "Edit or delete a file in a revision without changing the working copy.",
  "sources": [
    "https://github.com/jj-vcs/jj/releases/tag/v0.46.0",
    "https://github.com/jj-vcs/jj/blob/v0.46.0/cli/src/commands/file/edit.rs",
    "https://github.com/jj-vcs/jj/blob/v0.46.0/cli/src/commands/file/delete.rs"
  ],
  "rank": 0.98031,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v2+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "wave1b-tools-20261017",
    "verdict_id": "wave1b-tools-20261017:wave1b-tools-20261017-3819bdf23a51cc87-11:gate",
    "evidence_hash": "c349f85a5c6a8f91cc504671584220dee91ad8b01e7640a220afb424a30cc72f"
  },
  "review": {
    "draft_hash": "1080c68e231c4625ed28d203e6b26f73a87e5d5c8a205cb1432e5fdc667c9b2f",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T21:28:17.000Z",
    "decision": "wave1b-tools-20261017:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.98 >= 0.9; 2 needed) and Jev gave 0.69 (>= 0.6 needed)."
  }
}
