andy-5 / wslgit

Use Git installed in Bash on Windows/Windows Subsystem for Linux (WSL) from Windows and Visual Studio Code (VSCode)
MIT License
1.19k stars 59 forks source link

Usage from another distro (inter-distro behaviour) #142

Open ferferga opened 4 months ago

ferferga commented 4 months ago

Hello

I have git configured in my default distro with all my credentials and config. I have another distro, and I would like to use the git from my default distro, but currently this fails:

image

Would be great if this could be a supported use case.

andy-5 commented 4 months ago

Unfortunately, this is currently not possible. The current behavior specifically checks if the working directory is inside a WSL distro and uses git from that distro.

I think the main reason is that files from one distro are not easily accessible from within another distro. So git running in your default distro cannot access the files from the working directory in another distro.