AI Agent Hub
Back to plugins
⚙️

dsh-auto-git

Workflow Updated 2026.09.15

Run the following command in DeepSeek Harness:

dsh plugin install zhitiaojun/dsh-auto-git

Paste the following prompt into your AI chat to install this plugin:

Run dsh plugin install zhitiaojun/dsh-auto-git in the DeepSeek Harness terminal; the source is hosted at https://github.com/zhitiaojun/dsh-auto-git . Restart dsh web after installation to activate the plugin.

About this plugin

A DSH workspace is, by default, just a plain directory. Yet a number of community plugins, such as the branch chip and the git graph, require on the host side that the workspace path itself be a git repository; when the frontend detects repo as null it simply renders nothing. Making every workspace git-aware means the workspace directory has to be a repository, and doing that by hand for each one, followed by an empty commit to give HEAD a valid ref, is tedious and easy to forget on newly registered workspaces.

DSH Auto Git turns this into a fully automatic pipeline. It listens to the domain/changed event for workspace put operations, runs git init -b main on the root directory, and by default appends an --allow-empty commit so the branch name displays correctly instead of degrading to detached. On startup it also sweeps already-registered workspaces (toggleable via sweepExisting). The whole process is idempotent, never nests repositories, never touches remotes, never writes a .gitignore, and automatically skips directories that already sit inside an existing work tree. Each path is handled at most once per host process.

It is designed for users who pair DSH with git-aware community plugins like the git graph or the branch chip and do not want to manually initialize every new workspace. Once installed and dsh web is restarted, every new workspace automatically gains a valid branch name and git status, making the frontend chip appear immediately.

Use Cases

  • Auto git-init a workspace the moment it is registered so the branch chip appears instantly
  • Sweep existing workspaces on startup to fill in missing git status
  • Pair with git-graph or branch-chip plugins to eliminate blank UI in non-git workspaces

Best For

  • DSH users who already use git-graph or branch-chip community plugins
  • Developers who find manual git init per workspace tedious and want to skip it entirely
  • Teams wanting a ready-to-use git state and branch name the moment a workspace is created