Skip to content

两个目录是同一个 git 仓库的副本,打开项目选择第2个目录时,opencode 通过 git tracking 把 cwd 解析到了第1个目录的路径 #34373

Closed as not planned

Description

@JESSIELYM

Description

两个目录是同一个 git 远程仓库的两份不同 commit 副本(HEAD 不同,但 remote 指向同一个 xxxxxx.git,只是协议不同:一个 SSH,一个 HTTPS。 导致无法以第2个目录作为项目路径

Plugins

open code

OpenCode version

v1.17.11

Steps to reproduce

1、选择打开 C:\Project\目录1 ,正确打开了此目录对应的项目
2、继续添加项目,选择打开 C:\Project\目录2 ,日志确认 opencode 正确识别了该目录(creating instance / fromDirectory / bootstrapping 三行都是这个路径)。但进入 tracking 阶段后,cwd 被改成了 C:\Project\目录1 。
3、两个目录指向同一个 git 远程仓库(generate_case_by_AI.git),opencode 的 git tracking 逻辑很可能据此把工作目录"归并"到了它认为的"主"副本路径上,导致选的目录2被覆盖。

Screenshot and/or share link

No response

Operating System

windows11

Terminal

windows terminal

Activity

  1. github-actions commented on Jun 29, 2026

    @github-actions
    Contributor

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

  2. JESSIELYM commented on Jun 29, 2026

    @JESSIELYM
    Author
  3. github-actions commented on Aug 28, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

  4. Hona commented on Sep 2, 2026

    @Hona
    Member
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