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
Worktrees created from bare repos are not recognized #10643
OpenCode resolves the worktree is the parent of git rev-parse --git-common-dir. For bare repos, --git-common-dir returns the bare repo itself, so its parent is not a git repo.
Yeah, I'm having this issue as well. I use bare git worktrees and the opencode desktop app resolution up to the git root makes "projects" unusable for users that use git worktrees a lot to organize code.
Structure looks like this, and opencode isn't built to handle it and no options to circumvent or turn-off the upwards traversal...
project-name/ # Project container (NOT a working tree)
├── .bare/ # 🗄️ Bare git repository (the actual Git database)
├── .git # 🔗 Pointer file directing Git commands to .bare
├── main/ # ✅ Worktree (branch: main)
├── feature-auth/ # ✅ Worktree (branch: feature-auth)
└── hotfix-security/ # ✅ Worktree (branch: hotfix-security)
Reacted by sven1103-agent, Nighthawk and Dima Khadorkin
Activity
github-actions commentedon Jan 26, 2026
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
ben-vargas commentedon Mar 9, 2026
Yeah, I'm having this issue as well. I use bare git worktrees and the opencode desktop app resolution up to the git root makes "projects" unusable for users that use git worktrees a lot to organize code.
Structure looks like this, and opencode isn't built to handle it and no options to circumvent or turn-off the upwards traversal...
github-actions commentedon May 9, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.
franciscopower commentedon Aug 4, 2026
Can we reopen this issue? It's still a problem in the current version of Opencode (1.0.164) and makes it unusable for me