{
  "slug": "gh-stack-gh-stack-modify-restructures-a-branch-stack-996d4c53c39b",
  "title": "gh-stack gh stack modify restructures a branch stack",
  "tools": [
    "gh-stack"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-05-11T15:20:56.000Z",
  "announced_at": "2026-05-11T15:20:56.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When you have an active stack checked out, a clean working tree, no rebase in progress, no PR queued to merge, and linear history, run `gh stack modify` to open the TUI and stage branch changes. Save to apply them; if a conflict occurs, resolve it and run `gh stack modify --continue`, or restore the pre-modify state with `gh stack modify --abort`.",
    "examples": [
      "gh stack modify",
      "gh stack modify --continue",
      "gh stack modify --abort"
    ],
    "gotchas": [
      "Version: v0.0.3",
      "--continue: Continue after resolving conflicts.",
      "--abort: Abort the modify session and restore the stack to its pre-modify state.",
      "x: Drop a branch and its commits from the stack.",
      "d: Fold the selected branch into the branch below it, toward trunk.",
      "u: Fold the selected branch into the branch above it, away from trunk.",
      "r: Rename a branch locally and in stack metadata.",
      "Shift+↓ / Shift+↑: Move a branch down toward trunk or up away from trunk.",
      "Ctrl+S: Apply staged changes.",
      "Prerequisite: Requires an active stack checked out locally, a clean working tree, no rebase in progress, no PR in the stack queued for merge, and linear commit history.",
      "Prerequisite: Install GitHub CLI 2.0 or later and Git 2.36 or later; install the extension with `gh extension install github/gh-stack`. Authenticate with `gh auth login` if needed.",
      "Prerequisite: The release notes state Stacked PRs must be enabled for the repository for the CLI functionality to work.",
      "The command is interactive."
    ]
  },
  "why_it_matters": "Restructure a branch stack by dropping, folding, renaming, or reordering branches.",
  "sources": [
    "https://github.com/github/gh-stack/releases/tag/v0.0.3",
    "https://github.com/github/gh-stack",
    "https://docs.github.com/en/pull-requests/reference/stacked-prs-cli-commands"
  ],
  "rank": 0.96024,
  "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": "recover-20261008",
    "verdict_id": "recover-20261008:recover-20261008-52b9b216f46f72a8-0:gate",
    "evidence_hash": "654cd4fa466a4810805663e76faeb0346202c5f04c50807c284722cb52c517d3"
  },
  "review": {
    "draft_hash": "6a8ca7516eca374a3f9920bf0e3e2f347a5b2a24510c0d20773c3b98ac074f94",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "recover-20261008:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.96 >= 0.9; 2 needed) and Jev gave 0.70 (>= 0.6 needed)."
  }
}
