wslgit
wslgit copied to clipboard
Multiple WSL distro support
Hi! I have two Ubuntu WSL distro: Ubuntu and Ubuntu-20.04 for personal and working purposes respectively.
I set git executable in PhpStorm as C:\Users\yevhe\bin\wslgit.exe
and git integration works fine with Ubuntu, but not with Ubuntu-20.04. It returns error Error updating changes: not a git repository (or any of the parent directories): .git
Is it possible to get both of them working properly? If yes — how?
UPD: I have tried to download source code, replace Ubuntu-20.04
with Ubuntu
and compile two different versions, but still no luck.
wslgit
uses the default WSL distribution, which you can set via wsl --set-default
, see https://docs.microsoft.com/en-us/windows/wsl/basic-commands#set-default-linux-distribution .
There is currently no way to use wslgit
with multiple distributions at the same time.
The problem is that wslgit
always use the default wsl, so when accessing the filesystem from windows on another wsl instance the paths will translate to a Unix-path that exists on the other wsl instance, but wslgit
will then run in the default instance where that path likely doesn't exist.
I'll push a PR soon that should make it possible to use wslgit with multiple distros, you just have to make sure git/ssh is setup correctly in all distros you intend to access repos in :)
@dixydo There is now an alpha build available with the changes from @carlolars : https://ci.appveyor.com/project/andy-5/wslgit/build/artifacts
Does this work for your use case?
@andy-5 Thank you! Unfortunately I haven't possibility to test it right now as I'he already switched to single distro and route ssh config to repos manually to be able use your tool. I will try to test it on weekend.
The changes have no been released as wslgit
v1.2.0.