I'm learning Git and currently trying to configure it on WSL(v2) - Ubuntu 20.04 on Windows 10. When I execute commands like
git config --global user.name "XX YYY"
It works fine. I set my code editor to Sublime Text (v4) which is NOT installed on WSL, but on Windows. I invoke it using subl.exe --wait
and subl.exe is in PATH
. When I use subl to edit files from WSL, with subl.exe xyz.txt
, everything works and the location is displayed correctly. But I cannot open the .gitconfig file (which is of course, located at WSL home). So when I execute
git config --global -e
to edit the .gitconfig file directly, Sublime Text opens and informs me that the path \\\home\<username>\.gitconfig
has become unreachable. I know that in WSL2 the Linux home is mounted at a network location, and maybe this is causing the problem. What can I do to fix this?