{
  "slug": "gh-stack-rebase-sync-and-modify-operate-across-worktrees-14e6b34579ad",
  "title": "gh-stack rebase, sync, and modify operate across worktrees",
  "tools": [
    "gh-stack"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-10-02T20:28:19.000Z",
  "announced_at": "2026-10-02T20:28:19.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When a stack’s branches are spread across worktrees, use `gh stack rebase`, `gh stack sync`, or `gh stack modify`; gh-stack runs each change in the worktree owning its branch. If a rebase or modify pauses for conflicts, resolve and stage them in the reported checkout, then continue or abort from any worktree.",
    "examples": [
      "gh stack rebase",
      "gh stack sync",
      "gh stack modify"
    ],
    "gotchas": [
      "Version: v0.2.0",
      "Requires gh extension install github/gh-stack",
      "gh stack rebase --continue: Continue the rebase after resolving conflicts; stage resolutions with `git add` first.",
      "gh stack rebase --abort: Abort the rebase and restore branches to their pre-rebase state.",
      "gh stack modify --continue: Continue modify after resolving conflicts.",
      "gh stack modify --abort: Abort modify and restore the stack to its pre-modify state.",
      "Prerequisite: Git 2.36+ and GitHub CLI (`gh`) v2.0+ are required.",
      "Prerequisite: Install the extension with `gh extension install github/gh-stack`.",
      "Prerequisite: `modify` requires an active local stack, a clean working tree, no rebase in progress, no queued PR, and linear commit history.",
      "Requires Git 2.36+.",
      "gh-stack never creates, removes, or auto-stashes worktrees."
    ]
  },
  "why_it_matters": "Rebase, synchronize, or modify a stack whose branches are checked out in different worktrees.",
  "before": "Gather the whole stack into one directory before running these commands.",
  "sources": [
    "https://github.com/github/gh-stack/releases/tag/v0.2.0",
    "https://github.com/github/gh-stack/blob/v0.2.0/README.md"
  ],
  "rank": 0.98037,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v1+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "gap-20261007",
    "verdict_id": "gap-20261007:gap-20261007-f83a77e257b30700-1:gate",
    "evidence_hash": "d18974c5d39112207be0824b6562fd3bb5d7eddd15a5d9b6f2fb841f6aeaebe5"
  },
  "review": {
    "draft_hash": "088f9320892464d2f59eff2963611bb6f055eeada074ac85b7fc206c4570876c",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "gap-20261007:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.98 >= 0.9; 2 needed) and Jev gave 0.66 (>= 0.6 needed)."
  }
}
