DSH Git Source Control

September 1, 2026 ยท View on GitHub

DSH plugin for DSH-better-sidebar: adds a Source Control tab that mirrors the common VS Code Git workflow.

Features

  • Registers a single Source Control tab through ctx.betterSidebar.registerTab
  • Shows current branch, upstream, ahead/behind, last commit, and change count
  • Groups files into Merge Changes, Staged Changes, Changes, and Untracked
  • Opens file changes in the built-in DSH-better-sidebar diff tab; this plugin does not render its own file diff UI
  • Supports stage, unstage, and discard
  • Supports stage all, unstage all, discard all, fetch, pull, and confirmed push
  • Supports commit messages, including an AI button that uses the configured DSH model to draft a message from staged changes
  • Supports branch checkout/create and stash push/apply/drop
  • Exposes host API routes under /git-source-control/api/*
  • Exposes model-facing tools: git_status, git_diff, git_stage, git_unstage, git_discard, git_generate_commit_message, git_commit, git_branch, git_stash, git_fetch, git_pull, git_push

Usage

Load this plugin together with dsh-better-sidebar.

For GitHub installs, add the repository directly with dsh plugin add github:MarioLuLu7/dsh-git-plus.

npm install
npm run build
npm test

Optional environment variables:

  • DSH_GIT_REPOSITORY_ROOT: fixed repository root; otherwise the current session cwd is used
  • DSH_GIT_AUTO_REFRESH_MS: refresh interval, default 3000
  • DSH_GIT_PULL_MODE: ff-only, rebase, or merge
  • DSH_GIT_CONFIRM_PUSH: requires confirm: true for push unless set to false