From 43ec3e33db053d9dd82efa5ed0fcccdb776c5380 Mon Sep 17 00:00:00 2001 From: rajyan Date: Sun, 23 Aug 2020 13:44:49 +0900 Subject: [PATCH] added git for WSL2 https://github.com/microsoft/WSL/issues/4401 --- .aliases | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.aliases b/.aliases index e77484c..3ff6dc9 100644 --- a/.aliases +++ b/.aliases @@ -5,3 +5,11 @@ alias ojtr='oj t --print-memory -c ../x64/Release/${PWD##*/}.exe' alias ojs='oj s $(ls -t | grep .cpp$ | head -1)' alias ojdt='ojd && ojt' alias ojts='ojt && ojs' + +function git() { + if $(pwd -P | grep -q "^\/mnt\/c\/*"); then + git.exe "$@" + else + /bin/git "$@" + fi +}