elfgzp/dsh-branch-worktree ↗★ 1

dsh-branch-worktree

Pick a Git branch (or create one) on the DeepSeek Harness New Session screen and start the conversation inside an automatically created worktree.

包名
dsh-branch-worktree
兼容性
待验证
Harness 依赖范围
>=0.2.0
版本
1.0.0
许可证
MIT
最近更新
2026年10月30日

同名包的其他仓库

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:elfgzp/dsh-branch-worktree

Usage

  1. Click New Session.
  2. Choose your workspace, then click the branch chip in the middle.
  3. In the dropdown, pick an existing branch, or type a name under New branch — a based on picker then appears.
  4. Leave Create worktree on (the default), or turn it off to switch your current checkout instead.
  5. Press Start here (or hit Enter in the name field).

The session opens in the resulting directory, and the workspace appears in the sidebar under the branch name.

What the worktree toggle actually does

This is the part that is easy to misread: "Create worktree" does not imply "create branch". The rule is:

The branch name you giveWhat runs
Does not exist`git worktree add -b

— **creates the branch** and checks it out in the new worktree | | **Already exists** |git worktree add

` — reuses the branch, creating nothing | | Checked out in another worktree | Refused, because Git will not check out the same branch twice |

So a new name starts a new branch, an existing name reuses one, and you never get a surprise duplicate. The dropdown says which of the two is about to happen before you commit to it.

What happens on disk

For a worktree run of branch feature/login in /work/my-repo: