Title: Why does `gh stack rebase --upstack` include the current branch? · Issue #160 · github/gh-stack · GitHub
Open Graph Title: Why does `gh stack rebase --upstack` include the current branch? · Issue #160 · github/gh-stack
X Title: Why does `gh stack rebase --upstack` include the current branch? · Issue #160 · github/gh-stack
Description: Say I have the following stack main <- branch1 <- branch2 <- branch3 I'm on branch1, and just addressed some reviewer feedback by adding a few extra commits. Now I need to do the following: rebase branch2 on branch1 rebase branch3 on bra...
Open Graph Description: Say I have the following stack main <- branch1 <- branch2 <- branch3 I'm on branch1, and just addressed some reviewer feedback by adding a few extra commits. Now I need to do the following: rebase ...
X Description: Say I have the following stack main <- branch1 <- branch2 <- branch3 I'm on branch1, and just addressed some reviewer feedback by adding a few extra commits. Now I need to do the follo...
Opengraph URL: https://github.com/github/gh-stack/issues/160
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Why does `gh stack rebase --upstack` include the current branch?","articleBody":"Say I have the following stack\n\n```\nmain \u003c- branch1 \u003c- branch2 \u003c- branch3\n```\n\nI'm _on_ `branch1`, and just addressed some reviewer feedback by adding a few extra commits. Now I need to do the following:\n\n- rebase `branch2` on `branch1`\n- rebase `branch3` on `branch2`\n\nI do _not_ want to rebase `branch1` on `main` right now.\n\nMy instinct is to call `gh stack rebase --upstack` while on `branch1`, where I just addressed the feedback and added commits. I was expecting that to do what I outlined above and not change `branch1` in any way.\n\nSurprisingly (to me), it did this:\n- rebase `branch1` on `main`\n- rebase `branch2` on `branch1`\n- rebase `branch3` on `branch2`\n\nCan I ask about why `--upstack` includes a rebase of the current branch on the branch under it? That actually feels a bit \"down stack\"-ish to me.\n\nIt feels like this exact workflow is going to be pretty common for me, and the current workaround is for me to `gh stack switch` up to `branch2` and _then_ run `gh rebase --upstack`, but that feels pretty unnatural to me!","author":{"url":"https://github.com/DavisVaughan","@type":"Person","name":"DavisVaughan"},"datePublished":"2026-07-02T14:17:12.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/160/gh-stack/issues/160"}
| 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:d031e9d0-879f-3793-3268-686ed54af5d4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B9B6:2CD0FB:508BBAF:71AC63A:6A502404 |
| html-safe-nonce | 108c528526538dc283ed2053bcb43898b1c0808cd173644ed7316372a9d73285 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOUI2OjJDRDBGQjo1MDhCQkFGOjcxQUM2M0E6NkE1MDI0MDQiLCJ2aXNpdG9yX2lkIjoiODE1MzA0NDczODI4MTQwMDM2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 350ba48f3d8814ea0d79eace977f92c6883010a6077be9bf9df8231c9b6ed33e |
| hovercard-subject-tag | issue:4795280359 |
| 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/160/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6a4c1eb93fdfbc0a2d1dc61c3d4663b7e0fe33ebeb624221b4ce6ab9eda248e8/github/gh-stack/issues/160 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6a4c1eb93fdfbc0a2d1dc61c3d4663b7e0fe33ebeb624221b4ce6ab9eda248e8/github/gh-stack/issues/160 |
| og:image:alt | Say I have the following stack main <- branch1 <- branch2 <- branch3 I'm on branch1, and just addressed some reviewer feedback by adding a few extra commits. Now I need to do the following: rebase ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | DavisVaughan |
| hostname | github.com |
| expected-hostname | github.com |
| None | a08040246389072795e3b4e7b33c6d9a0c564eee02e829a809326d67c418b069 |
| 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 | d1b91b18e7330fc458dfd824c61eaed7daa830d6 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width