'Make GitHub Desktop work from WSL on Linux repositories

I am using Windows to do some Linux development with WSL.

When I add Linux repositories to GitHub, it recognizes them, but it gets confused with file names and line endings between Linux and Windows.

This doesn't happen on the terminal tools inside git > Ubuntu > WSL, but it does happen on git > Windows.

Is there a way to either run GitHub Desktop's GUI on Ubuntu within WSL or to make the Windows version run its internal git commands through WSL's bash? Maybe a git configuration in Windows to make it Linux-aware?



Solution 1:[1]

I use this repo https://github.com/andy-5/wslgit With this, you can use the linux git from windows.

To make it work with Github Desktop you have to replace the git it uses, it is in the folder C:\ProgramData\User\GitHubDesktop\app-2.9.12\resources\app\git\cmd

Be careful because it changes every time Github Desktop is updated and you have to change it again.

The git used by Github Desktop is different from the linux one and sometimes some errors come out, I have had to install the git-lfs and git-core packages.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Raul Lazaro Sanchez