Qcsj777/dsh-worktree-branch
Location and branch chips on DSH's New Session screen: switch worktrees, switch branches, or create either, with git run by the host.
Adds a Codex-style location and branch chip to the New Session screen for git workspaces. It shows the current branch (or the short hash when HEAD is detached), every local branch and every linked worktree, and it can create a worktree, switch to another worktree, switch branch, or create and switch to a new branch. Names are validated twice, by a local whitelist and then by git check-ref-format. Its non-goals are stated as well: no network operations such as fetch, pull or push, no deletes, no merge or rebase — and switching worktrees really does change that session's working directory, which the author calls the feature rather than a side effect.
Install
dsh plugin --profile desktop add github:Qcsj777/dsh-worktree-branchThe README's GitHub line for the desktop profile; it also documents a link: dependency for local development, in which case the plugin is added to the profile's package.json by hand. git must be on PATH. The package ships its own Cordis patch inserting the host half under the id worktree-branch.
Compatibility
Runs on the New Session screen of DSH's web/desktop shell and renders nothing when the session's working directory is not inside a git repository. The README is English with one Chinese paragraph, and its command examples are PowerShell rather than a POSIX shell. Because a third-party bundle cannot add Remote namespaces, the client and host halves talk over same-origin HTTP instead; every git call strips inherited GIT_* selectors such as GIT_DIR and GIT_WORK_TREE so a user shell cannot redirect it at another repository, and write operations are wrapped in the session's sandbox policy.
Details
- Repo: Qcsj777/dsh-worktree-branch
- Category: Coding & Development
- Stars: 0
- Version: not published to npm; installs from the GitHub default branch
Alternatives
lee259/dsh-workbench · FlashingChen/dsh-worktree · Eleven-is-cool/dsh-worktree