dsh-git-plugin
English · 简体中文
Install · Use · Docs & feedback
Keep Git in your DSH session
Inspect changes, create branches, run pre-commit checks, and keep recoverable snapshots. Read-only Web panel + 5 slash commands + 4 read-only model tools give you and your agent the same view of the repository.
- See the changes — branch, working tree, staged / unstaged diff, and history.
- Commit with checks — branch and commit directly in your session.
- Keep a snapshot — stash current changes, then list or restore them.
Version: 0.3.0. Verified host: DSH 0.2.0-rc.2. Requires Node.js ≥20 and Git ≥2.24. Compatibility and validation.
Install
Use your active profile; replace web as needed:
dsh plugin --profile web add dsh-git-plugin@0.3.0
New installations register the plugin automatically. Restart that profile's DSH process and refresh the browser when using Web.
Upgrading a manually enabled 0.2.0 profile? Follow the migration steps to avoid duplicate registration. Fixed GitHub tag and source installation.
Open a repository workspace/session, expand the right sidebar and select Git. See branch/file states, switch between staged and unstaged diffs, and browse commit history/detail. The panel is read-only; Git writes use the existing slash commands. Panel guide.
Use
/status
/diff
/branch feat/my-change
/commit feat: 完成一项修改
/status | Current branch and working-tree status |
/diff | Staged and unstaged change summaries |
/branch [<name>] | List branches, or create and switch |
/commit [<message>] | Show commit guidance, or run checks and commit |
/undo [list|pop] | Create, list, or restore stash snapshots |
The model can use git-status, git-diff, git-log, and git-show. For example:
Check Git status, diff, and the last five commits. Explain what is staged and what to verify before committing.
Commit scope: /commit <message> stages all changes in the target repository before committing. Check the scope first. Without a message it only shows guidance and changes.
Snapshots: /undo stashes working-tree changes, including untracked files. It does not revert commits. Restoring with pop may produce conflicts.
Need longer timeouts or a test hook? See configuration.
Docs and feedback
Version 0.3.0 adds the first read-only Web panel for Issue #1. Market inclusion is tracked separately. Presentation inspired by dsh-agent-teams; the SVG banner is original.
License
MIT