Last active
May 25, 2021 15:52
-
-
Save pexcn/a0155c762e6026ea1d52c15e9b81b05d to your computer and use it in GitHub Desktop.
Use msys2 git on vscode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
setlocal | |
rem https://github.com/eamodio/vscode-gitlens/issues/965#issuecomment-734013893 | |
set PATH=%~dp0usr\bin;%PATH% | |
:loop | |
if "%~1" equ "rev-parse" goto rev_parse | |
shift | |
if not "%~1"=="" goto loop | |
git.exe %* | |
goto :eof | |
:rev_parse | |
git.exe %* | cygpath -w -f - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
setlocal | |
rem https://github.com/microsoft/vscode/issues/4651 | |
set PATH=%~dp0usr\bin;%PATH% | |
if "%1" equ "rev-parse" goto rev_parse | |
git %* | |
goto :eof | |
:rev_parse | |
for /f %%1 in ('git %*') do cygpath -w %%1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
TODO:
git.exe
->git
?