DeepSeek Harness (DSH) allows Git repositories to be managed through a Web interface. Git worktrees are the standard way to work with different branches in isolated directories, but they usually require terminal operations. The dsh-git-worktree plugin brings this capability directly into the DSH Web UI, enabling branch selection, switching, and Worktree creation and isolation.
Plugin Introduction¶
This is a client-side plugin maintained by developer LaoYueHanNi. It is designed to address the need for Git branch management and Worktree isolation in the Web UI. The plugin is licensed under the MIT License.
Core Features¶
The plugin provides a set of operations covering branch switching and the full lifecycle management of Worktrees:
-
Branch Management
- Branch Switching: Switch branches directly in the Web interface, with support for checking out remote branches.
- Creation and Renaming: Supports creating new branches from any branch, or renaming local branches in place.
- Branch Update: Supports updating the current branch to its upstream, allowing only fast-forward updates.
- Remote Synchronization: Supports performing fetch and cleaning up expired tracking branches from the Web interface.
-
Worktree Management
- Isolation: By enabling Worktree mode, switch the workspace of the current branch to an isolated directory.
- Quick Jump: Supports jumping directly to an existing Worktree directory.
- Removal: Supports removing a Worktree, while handling uncommitted files and running sessions.
- Manager: Provides a unified view to see all Worktrees, including old and new storage locations.
-
Interaction Experience
- IDEA-style Selector: Supports hierarchical collapsing, search, and highlighting matching branches.
- Row Context Menu: The right-click menu provides operations such as checkout, new, rename, and delete.
Installation and Activation¶
Since direct installation from GitHub has ended, installation must be performed using npm. Ensure that the host version meets the requirements before installing.
Installation Command
dsh plugin --profile web add @laoyuehanni/dsh-git-worktree
Environment Requirements
* The web profile (dsh web) must be enabled.
* The host version must be dsh 0.1.7-rc.1 or later.
Typical Usage¶
After installation, the plugin can be managed with the following commands:
Update Plugin
dsh plugin --profile web update @laoyuehanni/dsh-git-worktree
Remove Plugin
dsh plugin --profile web remove @laoyuehanni/dsh-git-worktree
Notes¶
- Update Limitation: The plugin cannot be updated directly in place. You must run
removefirst and then runadd. - Storage Location: Newly created Worktrees are located under the
.dsh/gitworktree/directory inside the repository. Legacy storage (under the repository root) remains read-only for compatibility. - Configuration Storage: Plugin settings are stored in the DSH settings document, not in local files.
Summary¶
dsh-git-worktree adds full Git Worktree support to the DSH Web UI. By integrating an IDEA-style branch selector and a row context menu, it provides the ability to manage branches, synchronize remotes, and isolate Worktrees in the browser. It is suitable for developers who need to maintain multi-branch projects in a Web-based environment.
- GitHub Repository: https://github.com/LaoYueHanNi/dsh-git-worktree
- Plugin Directory: https://www.skillhub.cn/plugins/LaoYueHanNi/dsh-git-worktree