Using Git in Windows Subsystem for Linux through IntelliJ

前端 未结 9 922
萌比男神i
萌比男神i 2021-01-30 11:10

I\'m trying to set Git executable in IntelliJ to be the git installed in Windows Subsystem for Linux, I tried a few different ways, but always got some sort of error. Today I in

9条回答
  •  暖寄归人
    2021-01-30 11:36

    For me this solution works:

    File: git.bat

    @echo off
    setlocal enabledelayedexpansion
    set command=%*
    If %PROCESSOR_ARCHITECTURE% == x86 (
        C:\Windows\sysnative\bash.exe -c 'git %command%'
    ) Else (
        bash.exe -c 'git %command%'
    )
    

提交回复
热议问题