Git Worktree Manager
FlashingChen/dsh-worktree · skills
Codex-style permanent git worktrees for DeepSeek Harness: worktreecreate/list/remove agent tools, a /worktree chat command, and durable per-repo manifests.
★ 7GitHub stars
0Forks
2026-08-14Last updated
JavaScriptLanguage
MITLicense
Key features
- Worktrees live at /.dsh-worktrees/ — the same hidden directory pattern as Codex's .codex/worktrees/ — so they stay inside the repository (and, when the session workspace is the repo root, inside the session's workspace-write sandbox).
- Every worktree is recorded in a per-repository manifest, /.dsh-worktrees/manifest.json (name, path, base commit, created-at, creator session).
- The manifest is what makes worktrees permanent: they survive DSH restarts, are listed by the tools/command, and are recognized when a new session is opened inside one.
- Creating a worktree also registers it in ctx.workspaceRegistry, so it appears in the DSH workspace list — the native way to "open" it later.
- Removing a worktree runs git worktree remove (with --force when requested), deletes the manifest entry, and unregisters the workspace.
Requirements
- git ≥ 2.31 (uses git rev-parse --path-format=absolute --git-common-dir).
- A DSH profile with the tools, commands, and subprocess services (the web profile has all three via dsh-base).
Install command
dsh plugin --profile web add github:FlashingChen/dsh-worktree