buz*_*ert 5 github github-desktop windows-subsystem-for-linux
我正在使用 Windows 使用 WSL 进行一些 Linux 开发。
当我将 Linux 存储库添加到 GitHub 时,它会识别它们,但它会与 Linux 和 Windows 之间的文件名和行结尾混淆。
这不会发生在里面的终端工具上git > Ubuntu > WSL,但它确实会发生在git > Windows.
有没有办法在 WSL 中的 Ubuntu 上运行 GitHub Desktop 的 GUI,或者让 Windows 版本通过 WSL 运行其内部 git 命令bash?也许 Windows 中的 git 配置可以使其支持 Linux?
小智 0
我使用这个repo https://github.com/andy-5/wslgit 有了这个,你就可以从Windows使用linux git。
要使其与 Github Desktop 一起使用,您必须替换它使用的 git,它位于文件夹 C:\ProgramData\User\GitHubDesktop\app-2.9.12\resources\app\git\cmd 中
请小心,因为每次 Github Desktop 更新时它都会改变,你必须再次更改它。
Github Desktop 使用的 git 与 linux 不同,有时会出现一些错误,我不得不安装 git-lfs 和 git-core 软件包。