Preface¶
DeepSeek Harness (DSH) uses a plugin-based architecture and allows users to extend its functionality. During development or debugging, switching Git branches frequently is a common operation. This usually requires leaving the DSH interface and returning to the terminal to execute commands. The dsh-git-branch-manage plugin solves this fragmentation issue by integrating Git status directly into the session interface and providing a menu-based entry point for branch management, thereby reducing the frequency of tool switching.
Plugin Overview¶
This is a DeepSeek Harness (DSH) plugin package developed by the maintainer LongSir0419. It mainly implements a “Git branch badge,” displaying the current branch name in the session header and the new session welcome page, and supports switching, creating, pulling, pushing, and deleting branches through left-click and right-click menu actions.
Core Features¶
The plugin provides a complete set of Git branch interaction capabilities, as follows:
- Branch Display
The current Git branch is displayed in the Session Header and on the new session welcome page. - Left-Click Menu
Clicking the badge opens the branch list menu.- The menu supports displaying local branches and remote branches.
- The list uses an IDEA-style directory tree structure.
- The local branch list only shows branches active within the last 7 days.
- Right-Click Menu
Right-clicking the branch badge allows quick execution of the following actions: switch branch, pull, fetch, and push. - Create Branch
When choosing “Create Branch” in the menu, the plugin first pulls the current branch, then creates and switches to the new branch. Prefix suggestions are provided during the creation process. - Delete Branch
- Only local branches can be deleted.
- Safe deletion mode (
-d) is used, so remote branches will not be force-deleted. - The system refuses to delete the current branch and remote branches.
- Interaction Feedback
- A confirmation dialog is shown before switching branches.
- A dot-style loading animation is displayed during operations such as pulling and pushing.
Installation and Enablement¶
Run the following command in the terminal to install the plugin:
dsh plugin --profile web add @wanghailong0419/dsh-git-branch-manage
After installation is complete, reopen the DSH Web client, and the plugin will be activated automatically.
Typical Usage¶
After successful installation, you can see the current branch badge in the top bar of the DSH session interface.
* View Branches: Left-click the badge to view the branch list.
* Switch Branches: Click the target branch in the list.
* Execute Actions: Right-click the badge and select Pull, Push, or Switch.
Applicable Scenarios and Notes¶
This plugin is suitable for developers who need to manage Git branches directly within the DSH interface. Please note the following before use:
* The plugin runs with DSH process permissions, and its operations have the effect of terminal commands.
* The branch deletion feature is limited to local branches and refuses to delete the current branch. Please confirm the operation target.
* It is recommended to review the source code and license (MIT) before use.
Summary¶
dsh-git-branch-manage simplifies the branch management process by visualizing Git branch information and integrating it into the DSH interaction flow. If you frequently work with code in DSH, this plugin can serve as a lightweight helper tool.
For more details and source code, visit:
* GitHub Repository
* Community Directory Page