Last active
December 16, 2020 14:19
-
-
Save xymopen/1be836c5ddc43abf409611d56d0705be to your computer and use it in GitHub Desktop.
Start a cmd with MinGW come with Git for Windows
This file contains hidden or 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 | |
for /f "delims=" %%i in ('where git') do ( | |
set "GIT_PATH=%%~dpi" | |
goto _end_of_where | |
) | |
:_end_of_where | |
if "%GIT_PATH:~-1%" == "\" ( | |
set "GIT_PATH=%GIT_PATH:~0,-1%" | |
) | |
set "PATH=%GIT_PATH%\..\usr\bin;%GIT_PATH%\..\mingw64\bin;%GIT_PATH%\..\mingw32\bin;%PATH%" | |
cmd | |
endlocal | |
exit /b |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment