
If you did the two optional installation steps then you can then just run any git command from a Windows console by running wslgit COMMAND or git COMMAND and it uses the Git version installed in WSL. If there is any additional output when your bash shell starts, the VSCode Git plugin cannot correctly parse the output. Agent pid 123) during startup of an interactive bash shell. If you use a SSH agent, make sure that it does not print any text (like e.g. You cannot enter your passphrase in VSCode! "git.path": "C:\\CHANGE\\TO\\PATH\\TO\\wslgit\\cmd\\wslgit.exe"Īlso make sure that you use an SSH key without password to access your git repositories, or that your SSH key is added to a SSH agent running within WSL before starting VSCode.

If not, set the appropriate path in your VSCode settings.json: VSCode will find the git executable automatically if the two optional installation steps were taken.

You may also need to install the latest Microsoft Visual C++ Redistributable for Visual Studio 2017. To change the environment variable, type Edit environment variables for your account into Start menu/Windows search and use that tool to edit Path. Add the wslgit\cmd directory to your Windows Path environment variable (user or system). The install.bat script creates a folder structure similar to the one used by Git For Windows, and creates some useful symbolic links in the wslgit\cmd and wslgit\bin folders. Run the install.bat script as administrator. The latest binary release can be downloaded from the releases page.

For these two to interoperate, this tool translates paths between the Windows ( C:\Foo\Bar) and Linux ( /mnt/c/Foo/Bar) representations.

The primary reason for this tool is to make the Git plugin in Visual Studio Code (VSCode) work with the git command installed in WSL. This project provides a small executable that forwards all arguments to git running inside Bash on Windows/Windows Subsystem for Linux (WSL).
