You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: Ability to Change Git branches from Desktop App #31273
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Summary:
It would be useful to have the ability to switch branches in a workspace chat directly from the Desktop App UI as shown in the image below:
this would be beneficial for workflow as you would just be able to create a new chat in a workspace and switch branches right from the UI instead of having to start a new chat and open the terminal to switch branches. This ticket could also be extended in the future to integrate some other basic git functionality in the UI like fetching, pulling, creating a new branch etc.
This is not a duplicate as other issues have described this functionality as apart of a larger git system but those issues were closed without the implementation going through. This issue simply focuses on the ability to change branches.
Proposed Implementation
Server
packages/core/src/git.ts — Add listBranches(dir) to Git.Interface that runs git branch --format='%(refname:short)'
packages/opencode/src/project/vcs.ts — Add branches() and switchBranch(branch) methods to Vcs.Interface (reuses existing git.checkout())
packages/opencode/src/server/routes/instance/httpapi/ — Add two new endpoints: GET /vcs/branches and POST /vcs/switch
Client
New: packages/tui/src/component/dialog-branch-switch.tsx — A DialogSelect-based component that lists branches and switches on selection
packages/tui/src/routes/session/sidebar.tsx — Show current branch next to workspace label; clicking opens the branch dialog
Regenerate SDK via ./packages/sdk/js/script/build.ts
Branch changes are automatically reflected in the UI via the existing vcs.branch.updated event.
Activity
github-actions commentedon Jun 7, 2026
This issue might be a duplicate of existing issues. Please check:
Please review those issues to see if your request is already covered or can be addressed there.
rekram1-node commentedon Jun 8, 2026
AUTOMATED: closing as duplicate of: #19433