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
Git subtree merge changes project ID (making history inaccessible) #12103
Since the project ID is based on the initial commit:
git rev-list --max-parents=0 --all
… once you perform a Git subtree merge, to merge a smaller repository as a subdirectory of the larger monorepo, it will potentially change the project ID (depending on which repository is newer).
The new project ID is then also the initial commit of the smaller repository, so now you share session history between the smaller repository and the monorepo, after the subtree merge.
I understand how and why this occurs, but it’s a little confusing. Perhaps if there were more than one root commit, something else should happen.
Plugins
none
OpenCode version
1.1.47
Steps to reproduce
Open a project, start a session.
Now either:
merge another repo as a subdirectory of this one: git subtree add --prefix=subdir other-remote other-branch,
or just add another root to the commit tree: git switch --orphan orphan and commit something.
Activity
github-actions commentedon Feb 4, 2026
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if this doesn't address your specific case.