Skip to content

Git Worktree List reports error _not in a worktree_, possibly issue with UNC path? #19

@msftrncs

Description

@msftrncs

Version: 1.3.2
Worktree and Git path: \\USNEFS100.rosenbauer.local\media\GIT Repositories\y2020_controller (./.git)
Additional worktree: \\USNEFS100.rosenbauer.local\media\GIT Repositories\y2020_controller_3

I receive the following error message in VS Code's right bottom notification area when I attempt Git Worktree: List:

---------------- Error Message ----------------

You are not in a worktree or bare repo

I initially started in C:\Repositories\y2020_controller_4 and I switched to worktree \\USNEFS100.rosenbauer.local\media\GIT Repositories\y2020_controller using the Git Worktree: List command. I attempted to list worktrees again at this point and received the error. I manually switched folders in VS Code to another worktree in the same repository (y2020_controller_3) and the same message occurs on the Get Worktree: List command there.

Yes, I have worktrees on a network drive and on a local drive, and since this evolved from a regular repository, one of the worktrees is the original clone with the .git folder. This strategy first evolved because it is a large repository and I can switch workstations without notice so keeping the repository on a network drive facilitated that, but later needed to move a worktree (1 at first) to a local drive to speed up the build process.

I am wondering about the space in the repository path since I have no problem when running the command from y2020_controller_4. It might have to do with needing to escape/quote the spaces in the path when executing Git commands or VS Code?

However I am also having some difficulties with Git Worktree since I do not have a bare repository clone. Keep in mind I am evaluating Git Worktree, as I already know how to work with GIT work trees manually from the command line.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions