Created
April 26, 2019 04:42
-
-
Save mslinn/c199e5dbb1b921ad2329d76b069b687d to your computer and use it in GitHub Desktop.
Run WSL git from native Windows apps
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 | |
| rem Taken from https://stackoverflow.com/a/54106424/553865 | |
| setlocal enabledelayedexpansion | |
| set command=%* | |
| set find=C:\Users\%USERNAME%\AppData\Local\Temp\git-commit-msg-.txt | |
| set replace=/mnt/c/Users/%USERNAME%/AppData/Local/Temp/git-commit-msg-.txt | |
| call set command=%%command:!find!=!replace!%% | |
| echo | C:\Windows\System32\bash.exe -c 'git %command%' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment