dsh-simple-worktree-plus: A Git Worktree Management Plugin

Introduction

DeepSeek Harness (DSH) adopts a plugin-based architecture. When developing tasks that involve handling multiple Git branches, managing multiple Worktrees can easily become cumbersome. dsh-simple-worktree-plus is a plugin designed for this scenario. Built on top of alpacachen/dsh-worktree, it focuses on enhancing deletion strategies, UI access points, and management capabilities for specific workspaces.

What is this

This is a Git Worktree management plugin. Maintained by GitHub-Xzhi and licensed under MIT. It provides DSH with an independent workspace management identity and offers more flexible branch handling options.

Core Features

  • Branch Handling: Handle associated Git branches when deleting a Worktree.
  • Delete Branch by Default: Enables the “Delete Git branch simultaneously” option as the default behavior.
  • Force Delete Unmerged Branches: Uses git branch -D to force delete unmerged branches by default (use with caution).
  • Top Bar Access: Opens Worktree management in the top bar, located next to the workspace selector.
  • Sidebar Access: In the sidebar, Worktree management is located above Settings.
  • Scoped Workspace Management: Right-click on a specific workspace to scan only that workspace.
  • Delete Default Preferences: Configures the default state of checkboxes in the deletion dialog.
  • Standalone Plugin Identity: Uses the @xzhi/dsh-simple-worktree-plus package and plugin identity.

Installation and Activation

Install the plugin using the following command:

dsh plugin --profile web add @xzhi/dsh-simple-worktree-plus

After installation or upgrade, restart dsh web and refresh the page.

Typical Usage

  1. Create a Worktree from a new session in the Git Workspace.
  2. Use “Worktree Management” in the sidebar to view Worktrees for all workspaces.
  3. Right-click on a Workspace and select “Worktree Management” to scan only that workspace.
  4. When deleting a Worktree, use the confirmation option to delete its Git branch.

Use Cases and Notes

This plugin is suitable for developers who need to handle multi-branch tasks within the DSH environment. Please note: Force deleting unmerged Git branches will permanently remove commits that exist only on that local branch. Before performing a force delete, ensure that important work has been pushed to the remote, merged, or backed up in another way.

Conclusion

This plugin simplifies the Worktree management workflow in DSH by optimizing deletion strategies and interface integration. For more details, please refer to the plugin directory or the GitHub repository.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye