- Rename
project/.git1
andproject-dev/.git1
toproject/.git
andproject-dev/.git
respectively becausegit
is not able to add.git
to staged changes. - Open
project
folder in Code and open SCM view. You should see1
file is untracked. - Open file
2
fromproject_dev
folder. On SCM sideview nothing is changed. - Open
.git_dev/config file
and remove line withworktree=../
. At the source control view new provider called project-dev should appear with file2
as untracked. - Put line with
worktree
back. File1
should appear inproject-dev
instead of1
Try to click on 1
at project-dev
section. An error occures:
Unable to open '1': Unable to read file (Error: File not found (/home/user/workspace/two-repos/project-dev/1)).
Expected: /home/user/workspace/two-repos/project/1
is opened.
Try to reload VS Code and go to Source Control sideview.
Note: files 1
and 2
should be opened in editors.
Expected: project
and project-dev
should be listed among Source Control Providers.
Instead only project
is presented.
If you remove line about worktree
in project/.git_dev/config
then project_dev
would be shown again and you have to add it back if you want to project-dev
track the right worktree.