I have git installed within ubuntu WSL 2 on windows 10 ver 2004. Normally when I open VSCode, the default git extension throws a not found error, and then I open a new remote-wsl window.
I recently installed gitlens to use the git line blame feature but while enabled it fails:
GitLens was unable to find Git. Please make sure Git is installed. Also ensure that Git is either in the PATH, or that 'git.path' is pointed to its installed location.
I dont want multiple installations of git, I want to use the WSL git found on my ubuntu instance everywhere.
How do I achieve that for GitLens ?
+1
I've WSL 1, git is installed in WSL Ubuntu. I use git on WSL Ubuntu, code is on Windows filesystem referenced via /mnt within WSL. When I switched to VSCode Remote develoment on WSL GitLens lost inline hints.
It works when you install extensions inside Remote VSCode
1) Open a new VSCode Remote-WSL window (by connecting to an existing WSL distro)
2) Go to extensions, Gitlens click Install, i.e. Install on WSL: Ubuntu button
3) Reload the VSCode Remote-WSL window
4) Optional: Disable Git in Local window
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
It works when you install extensions inside Remote VSCode
1) Open a new VSCode Remote-WSL window (by connecting to an existing WSL distro)
2) Go to extensions, Gitlens click Install, i.e.
Install on WSL: Ubuntubutton3) Reload the VSCode Remote-WSL window
4) Optional: Disable Git in Local window