github / github/gh-stack

Github stack does not persist across worktrees

未關閉
#459 1 則留言 8 個 reaction 已指派 0 人 在 GitHub 檢視
bug topic: cli - worktrees
主要語言
Go
星號
1.5k
分支
70
平均合併
1 天 8 小時
30 天內合併 PR
7

描述

When opening a branch in a worktree and running `gh stack init`, it does not keep track of the stack locally. `gh-stack` keeps stack membership in local state tied to the checkout where `init` ran. If I create a worktree & use `gh-stack`, the stack doesn't persist on my machine, even if I open the branch back in my main worktree. Inside a worktree, $GIT_DIR is .git/worktrees// — so `worktree remove` deletes the stack state with it

This is confusing & not obvious. Additionally, a modern LLM workflow may involve different sub-agents in different worktrees. This makes gh-stack worse than, say git-spice for this purpose, since I can't easily update my work if I checkout the branch on my main worktree.

The stack _is_ stored remotely on Github, but THAT doesn't always work - seems like GitHub only records a stack for a chain of two or more PRs.

貢獻指南

開啟貢獻指南

研究方向

從 `gh stack init` 入口開始,追蹤當 `$GIT_DIR` 指向 `.git/worktrees//` 時本機 stack 成員關係的儲存方式。在主要 worktree 和連結的 worktree 之間重現此行為,包括 `worktree remove`;從另一個 worktree 開啟該分支時,stack 成員關係仍然可用,即表示完成。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
git, github, go
領域
cli, tooling
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
活躍
描述清晰度
基本清楚
新手友好度
52/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。