Created
June 17, 2019 19:32
-
-
Save Zeryther/b01acffd501b21fdb885558d469b7870 to your computer and use it in GitHub Desktop.
Use this as a replacement for the git executable in JetBrains IDEs to run Git from WSL - modified version of https://stackoverflow.com/a/43878654/4117923
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 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\wsl.exe cd "`wslpath '%cd%'`" && git %command% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment