[FEATURE]:Direct support for Git 'work-tree' based 'Projects' #8341

Open
opened 2026-02-16 18:09:43 -05:00 by yindo · 1 comment
Owner

Originally created by @DennisVM-D2i on GitHub (Feb 2, 2026).

Originally assigned to: @rekram1-node 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

Today - on my Windows 11 machine, I'd updated Ollama to v0.15.4, and installed OpenCode, and pointed it at a Git work-tree based working-copy directory/folder aka 'Project', but it seemed to switch over to the parent/root branch instead.

Originally created by @DennisVM-D2i on GitHub (Feb 2, 2026). Originally assigned to: @rekram1-node 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 Today - on my Windows 11 machine, I'd updated Ollama to v0.15.4, and installed OpenCode, and pointed it at a Git work-tree based working-copy directory/folder aka 'Project', but it seemed to switch over to the parent/root branch instead.
yindo added the windowsdiscussion labels 2026-02-16 18:09:43 -05:00
Author
Owner

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

This issue might be a duplicate of existing issues. Please check:

  • #5638: Desktop app - opening multiple git worktrees from the same repo replaces existing project
  • #10643: Worktrees created from bare repos are not recognized
  • #8694: OpenCode doesn't respect git env vars (GIT_DIR and GIT_WORK_TREE)

These issues collectively address the lack of proper git worktree support in OpenCode. #5638 is the most directly related to your specific issue about worktrees switching to the parent branch.

Additionally, you may want to review #9816 (How to make opencode treat a directory as Project?) and #10365 (Symlinked directories not visible in project picker) for related project detection challenges.

Feel free to ignore if your specific case differs from these.

@github-actions[bot] commented on GitHub (Feb 2, 2026): This issue might be a duplicate of existing issues. Please check: - #5638: Desktop app - opening multiple git worktrees from the same repo replaces existing project - #10643: Worktrees created from bare repos are not recognized - #8694: OpenCode doesn't respect git env vars (GIT_DIR and GIT_WORK_TREE) These issues collectively address the lack of proper git worktree support in OpenCode. #5638 is the most directly related to your specific issue about worktrees switching to the parent branch. Additionally, you may want to review #9816 (How to make opencode treat a directory as Project?) and #10365 (Symlinked directories not visible in project picker) for related project detection challenges. Feel free to ignore if your specific case differs from these.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#8341