[FEATURE]: Allow specifying git branch when creating a new workspace #9392

Closed
opened 2026-02-16 18:12:20 -05:00 by yindo · 2 comments
Owner

Originally created by @lldxflwb on GitHub (Feb 15, 2026).

Originally assigned to: @thdxr on GitHub.

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

Allow passing an explicit git branch name when creating a new workspace (git worktree).

  • If the branch exists locally and isn't already checked out in another worktree, create a worktree for it.
  • If the branch doesn't exist, create it from current HEAD.
  • Keep auto-generated worktrees under opencode/* and restrict reset/delete behavior to those managed branches.

Related: #9965

Originally created by @lldxflwb on GitHub (Feb 15, 2026). Originally assigned to: @thdxr on GitHub. ### Feature hasn't been suggested before. - [x] I have verified this feature I'm about to request hasn't been suggested before. ### Describe the enhancement you want to request Allow passing an explicit git branch name when creating a new workspace (git worktree). - If the branch exists locally and isn't already checked out in another worktree, create a worktree for it. - If the branch doesn't exist, create it from current HEAD. - Keep auto-generated worktrees under opencode/* and restrict reset/delete behavior to those managed branches. Related: #9965
yindo closed this issue 2026-02-16 18:12:20 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Feb 15, 2026):


This issue might be a duplicate of or closely related to existing issues. Please check:

  • #9965: In desktop, with workspaces enabled, allow "New Workspace" to be initialized using an existing branch — This covers the same core request
  • #13592: Enhanced Workspace Support: Custom Settings & Creation Dialog — Also requests custom branch names when creating workspaces
  • #13343: GitHub / Git Worktree & Branch Picker — Broader feature request that includes branch selection in UI

These issues all overlap on allowing users to specify branches when creating new workspaces. Consider consolidating efforts or cross-referencing to avoid duplicate work.

@github-actions[bot] commented on GitHub (Feb 15, 2026): --- This issue might be a duplicate of or closely related to existing issues. Please check: - #9965: In desktop, with workspaces enabled, allow "New Workspace" to be initialized using an existing branch — This covers the same core request - #13592: Enhanced Workspace Support: Custom Settings & Creation Dialog — Also requests custom branch names when creating workspaces - #13343: GitHub / Git Worktree & Branch Picker — Broader feature request that includes branch selection in UI These issues all overlap on allowing users to specify branches when creating new workspaces. Consider consolidating efforts or cross-referencing to avoid duplicate work.
Author
Owner

@lldxflwb commented on GitHub (Feb 15, 2026):

Closing this as a duplicate of the existing workspace/branch requests (#9965, #13592). Implementation appears to be in progress in #13593.

Sorry for the noise — I opened this because the feature is really needed for my workflow.


抱歉重复开了 issue。这个需求和 #9965 / #13592 重合,且 #13593 看起来已经在实现中,所以我这里先关闭。

@lldxflwb commented on GitHub (Feb 15, 2026): Closing this as a duplicate of the existing workspace/branch requests (#9965, #13592). Implementation appears to be in progress in #13593. Sorry for the noise — I opened this because the feature is really needed for my workflow. --- 抱歉重复开了 issue。这个需求和 #9965 / #13592 重合,且 #13593 看起来已经在实现中,所以我这里先关闭。
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9392