Managing Git repositories directly in the DSH workbench usually requires switching to a local terminal. The dock-git plugin mounts a launcher panel in the sidebar (active item git), directly integrating Git history visualization and repository operations into the Web environment. Maintained by AKS1st, it aims to provide a more intuitive way than native Git tools for viewing commit history, managing branches, and handling code changes.

Core Features

  • Swimlane-style commit graph: displays branch/tag/remote-ref badges and uncommitted change nodes.
  • Commit details: three-column comparison showing commit message, author, changed file tree, and old/new file contents.
  • Multi-repository discovery: scans for independent Git repositories in the current workspace (cwd and its two levels of subdirectories). Supports switching the target repository from the repository list.
  • Branch and tag management: supports creating, renaming, and deleting branches; creating/deleting tags; checking out branches; and merging local branches.
  • Staging and committing: provides VSCode-like status/stage/unstage/commit operations.
  • Commit reset and revert: supports mixed/soft/hard reset and reverting commits.
  • Remote operations: supports list/add/remove/set-url, fetch, pull, and push.
  • Configuration read/write: reads any repository configuration; writes are limited to user.name / user.email.
  • Multi-language support: built-in Chinese and English interfaces.

Installation and Enablement

You must first install the dock base plugin, then install dock-git.

dsh plugin --profile web add dock-base
dsh plugin --profile web add dock-git

Typical Usage

  • Mount the launcher panel in the sidebar (active item git) and render the commit history graph for Git repositories in the current workspace.
  • Click a commit to expand its details and view the commit message, author, changed file tree, and three-column diff.
  • Switch the target repository in a multi-repository workspace.

Dependencies and Notes

  • Dependencies: requires dock >= 0.1.0 (required) and the system git command-line tool.
  • Security: repoRoot is confined to the session workspace; Git parameters undergo whitelist validation; large outputs are streamed.
  • Optional companion: dock-files is not required.

dock-git brings the style of the VSCode Git panel to the DSH workbench, providing an integrated Git history viewer and repository manager. Its security measures ensure that operations are confined to the session workspace, making it suitable for safe use in a Web environment.