Skip to content

[FEATURE]: Ability to Change Git branches from Desktop App #31273

Closed as duplicate

Description

@RavdeepAulakh

Feature hasn't been suggested before.

  • 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:

Image

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

  1. packages/core/src/git.ts — Add listBranches(dir) to Git.Interface that runs git branch --format='%(refname:short)'
  2. packages/opencode/src/project/vcs.ts — Add branches() and switchBranch(branch) methods to Vcs.Interface (reuses existing git.checkout())
  3. packages/opencode/src/server/routes/instance/httpapi/ — Add two new endpoints: GET /vcs/branches and POST /vcs/switch

Client

  1. New: packages/tui/src/component/dialog-branch-switch.tsx — A DialogSelect-based component that lists branches and switches on selection
  2. packages/tui/src/routes/session/sidebar.tsx — Show current branch next to workspace label; clicking opens the branch dialog
  3. 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

  1. github-actions commented on Jun 7, 2026

    @github-actions
    Contributor

    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.

  2. rekram1-node commented on Jun 8, 2026

    @rekram1-node
    Collaborator

    AUTOMATED: closing as duplicate of: #19433

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions