Skip to content

Worktrees don't work when the worktree is created on Windows but used from WSL #6187

@svick

Description

@svick

Existing issues matching what you're seeing

  • I was not able to find an open or closed issue matching what I'm seeing

Git for Windows version

git version 2.53.0.windows.2
cpu: x86_64
built from commit: e9edee0b34751bf4d7d1feda0e2535bff64d4e77
sizeof-long: 4
sizeof-size_t: 8
shell-path: D:/git-sdk-64/usr/bin/sh
rust: disabled
feature: fsmonitor--daemon
gettext: enabled
libcurl: 8.18.0
OpenSSL: OpenSSL 3.5.5 27 Jan 2026
zlib: 1.3.1
SHA-1: SHA1_DC
SHA-256: SHA256_BLK
default-ref-format: files
default-hash: sha1

Windows version

Windows 11

Windows CPU architecture

x86_64 (64-bit)

Additional Windows version information

Microsoft Windows [Version 10.0.26100.8246]

Options set during installation

Editor Option: VIM
Custom Editor Path:
Default Branch Option:
Path Option: Cmd
SSH Option: OpenSSH
Tortoise Option: false
CURL Option: WinSSL
CRLF Option: CRLFAlways
Bash Terminal Option: MinTTY
Git Pull Behavior Option: Merge
Use Credential Manager: Enabled
Performance Tweaks FSCache: Enabled
Enable Symlinks: Disabled
Enable FSMonitor: Disabled

Other interesting things

No response

Terminal/shell

powershell

Commands that trigger the issue

On Windows, I have created a worktree of the dotnet-runtime repo called dotnet-runtime-wsl:

C:\code\dotnet-runtime> git worktree add ..\dotnet-runtime-wsl HEAD

Then on WSL, I have attempted to use git from this worktree:

/mnt/c/code/dotnet-runtime-wsl$ git status

Expected behaviour

A Windows-created worktree works under WSL, just like a Windows-created repo does.

Actual behaviour

An error when I attempt to use the worktree on WSL, seemingly an issue with translating Windows paths to Linux paths.

/mnt/c/code/dotnet-runtime-wsl$ git status
fatal: not a git repository: /mnt/c/code/dotnet-runtime-wsl/C:/code/dotnet-runtime/.git/worktrees/dotnet-runtime-wsl

Repository

https://github.com/dotnet/runtime/, but this is almost certainly not repository-specific.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions