Title: gh stack modify: modify fails when merged branches have been pruned · Issue #146 · github/gh-stack · GitHub
Open Graph Title: gh stack modify: modify fails when merged branches have been pruned · Issue #146 · github/gh-stack
X Title: gh stack modify: modify fails when merged branches have been pruned · Issue #146 · github/gh-stack
Description: Looks like modify can't deal with pruned branches once they have been merged. See below output: ➜ token-scanning-service git:(aerendel/fix-generic-secrets-metadata) gh stack modify ✗ failed to apply modifications: building snapshot: reso...
Open Graph Description: Looks like modify can't deal with pruned branches once they have been merged. See below output: ➜ token-scanning-service git:(aerendel/fix-generic-secrets-metadata) gh stack modify ✗ failed to appl...
X Description: Looks like modify can't deal with pruned branches once they have been merged. See below output: ➜ token-scanning-service git:(aerendel/fix-generic-secrets-metadata) gh stack modify ✗ failed to ...
Opengraph URL: https://github.com/github/gh-stack/issues/146
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"gh stack modify: modify fails when merged branches have been pruned","articleBody":"Looks like modify can't deal with pruned branches once they have been merged.\n\nSee below output:\n\n```\n➜ token-scanning-service git:(aerendel/fix-generic-secrets-metadata) gh stack modify\n✗ failed to apply modifications: building snapshot: resolving branch SHAs: failed to run git: fatal: ambiguous argument 'aerendel/mixed-content-types1': unknown revision or path not in the working tree.\nUse '--' to separate paths from revisions, like this:\n'git \u003ccommand\u003e [\u003crevision\u003e...] -- [\u003cfile\u003e...]'\n```\n\n### Observed behavior:\nThe bottom of my stack has been merged and the branch pruned so it doesn't exist locally or remotely anymore (not unusual once a branch is merged), and all `gh stack modify` operations fail to save. Any operation will fail, wether it's renaming a branch, reorganizing, dropping a branch, etc.\n\n### Repro:\n1. Make a stack with 2 or 3 layers\n2. Merge the first layer\n3. Delete the first layer's branch locally (or just answer Yes to gh stack's prune prompt)\n4. Run `gh stack modify` and try to save any modify operation","author":{"url":"https://github.com/Aerendel","@type":"Person","name":"Aerendel"},"datePublished":"2026-06-25T22:33:19.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/146/gh-stack/issues/146"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:f182d1db-2808-00a8-3188-6af46aa24cac |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ED28:53234:438A85B:5F7BDBA:6A4FBAB3 |
| html-safe-nonce | 975b5f84879fd01a25d93b4627b8079ce7efc2b113d0bc30f62ebb644cdfd057 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFRDI4OjUzMjM0OjQzOEE4NUI6NUY3QkRCQTo2QTRGQkFCMyIsInZpc2l0b3JfaWQiOiI3ODk2Nzk3OTE1MjYzMjUzMTcxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 8d48e02efebb51a677aca65b83809f729f38b96760a33c1242776973e24a8a82 |
| hovercard-subject-tag | issue:4747856286 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/github/gh-stack/146/issue_layout |
| twitter:image | https://opengraph.githubassets.com/929232f0b7a3dc53af8654ac359c1ea8c1a60d8113ee991d6b4b5da52e00906f/github/gh-stack/issues/146 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/929232f0b7a3dc53af8654ac359c1ea8c1a60d8113ee991d6b4b5da52e00906f/github/gh-stack/issues/146 |
| og:image:alt | Looks like modify can't deal with pruned branches once they have been merged. See below output: ➜ token-scanning-service git:(aerendel/fix-generic-secrets-metadata) gh stack modify ✗ failed to appl... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Aerendel |
| hostname | github.com |
| expected-hostname | github.com |
| None | b92d11c0aa4a77d54ef4af1078b6a15fb5a70a215b30c4ecf28889d5a8e656d9 |
| turbo-cache-control | no-preview |
| go-import | github.com/github/gh-stack git https://github.com/github/gh-stack.git |
| octolytics-dimension-user_id | 9919 |
| octolytics-dimension-user_login | github |
| octolytics-dimension-repository_id | 1151630728 |
| octolytics-dimension-repository_nwo | github/gh-stack |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1151630728 |
| octolytics-dimension-repository_network_root_nwo | github/gh-stack |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 4b249b445842943ed31549e027f57a8ade9881ed |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width