You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Request: first-class support for repositories where each stack branch is checked out in its own linked worktree (a common setup for multiplexed agent/parallel work).
Today (v0.1.0) this workflow is effectively unsupported:
The local tracking state (.git/gh-stack) is resolved through the per-worktree git dir, so linked worktrees cannot see stacks at all — even gh stack view fails there with current branch "X" is not part of a stack.
What we do today as a workaround, which native support could subsume: wrap gh-stack in a script that temporarily detaches HEAD in every worktree holding a stack branch, runs gh at the main worktree (parking the intended context branch there so stack resolution matches the invoking worktree), and restores everything afterwards.
Possible directions for native support:
Resolve the state file through the common git dir so all worktrees share it (makes read-only commands work everywhere, cheaply).
Rebase branches inside the worktree that holds them instead of checking them out (prior art: the --worktrees flag in the boneskull/gh-stack fork), or perform rebases without checkouts and let worktrees fast-forward.
Related bug reports from the same investigation: #471 (recorded-base discarded after parent history edits), #472 (sync exit code on push failure).
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Request: first-class support for repositories where each stack branch is checked out in its own linked worktree (a common setup for multiplexed agent/parallel work).
Today (v0.1.0) this workflow is effectively unsupported:
rebase,sync,initadoption) check branches out in their cwd, so any branch held by a linked worktree fails on git's one-branch-one-worktree rule (seegh stack rebasesilently succeeds whengit rebase --ontofails to start (in branch checked out in another worktree) #35 for a silent-failure aspect of this)..git/gh-stack) is resolved through the per-worktree git dir, so linked worktrees cannot see stacks at all — evengh stack viewfails there withcurrent branch "X" is not part of a stack.What we do today as a workaround, which native support could subsume: wrap gh-stack in a script that temporarily detaches HEAD in every worktree holding a stack branch, runs gh at the main worktree (parking the intended context branch there so stack resolution matches the invoking worktree), and restores everything afterwards.
Possible directions for native support:
--worktreesflag in the boneskull/gh-stack fork), or perform rebases without checkouts and let worktrees fast-forward.Related bug reports from the same investigation: #471 (recorded-base discarded after parent history edits), #472 (sync exit code on push failure).
All reactions