None of these options worked for me, so I built my own!
You can find my full solution here: https://gist.github.com/onecrayon/de756538d5331f7592065507c03b1864
In short: you need to proxy through a batch file (as suggested by pitrackster), but their batch file will fail when used with VSC because it doesn't properly escape the proxied command and fails to convert paths to and from Windows and Unix.
For posterity, here's the scripts I linked above at the time of this posting, sans ReadMe:
git.bat
@echo off
:: %~dp0 is the directory of this batch file
set proxy_path=%~dp0_proxy_cmd.bat
:: %* is the full command passed to this batch file
%proxy_path% git %*
_proxy_cmd.bat
@echo off
:: Properly escape the command
:: Many thanks to wsl-alias for this logic: https://github.com/leongrdic/wsl-alias
set cmd=%*
set cmd=%cmd:\"=\\"%
set cmd=%cmd:\'=\\'%
set cmd=%cmd:\=/%
set cmd=%cmd://=\\%
set cmd=%cmd:"=\"%
set cmd=%cmd:'=\'%
set cmd=%cmd:(=\(%
set cmd=%cmd:)=\)%
:: Grab the path to our proxy Bash script (%~dp0 is the directory of this batch file)
set bash_proxy=%~dp0_proxy_cmd.sh
set bash_proxy=%bash_proxy:\=\\%
:: Pass things off to the Bash script
bash.exe -c "$(wslpath %bash_proxy%) %cmd%"
_proxy_cmd.sh
##
# Evaluates command, parsing paths at both ends (Windows => Unix => Windows)
#
# Benefits to doing this instead of directly invoking the command in the batch file:
#
# + Easier to convert path arguments to Unix paths
# + sed regex does not require double escaping backslashes (not embedded in double quotes)
##
cmd=()
for arg in "$@"
do
if [[ $arg =~ ^[a-zA-Z]:/ ]]; then
cmd+=( $(wslpath "$arg") )
else
cmd+=("$arg")
fi
done
# TODO: Look into ways to convert inline paths via `wslpath` instead of hard-coding `/mnt` search
# Kind of a tricky issue, because our output could be basically anything
eval "${cmd[@]}" | sed \
-e 's|"/mnt/\([a-zA-Z]\)/\([^"]*\)"|"\1:/\2"|g' \
-e "s|'/mnt/\\([a-zA-Z]\\)/\\([^']*\\)'|'\\1:/\\2'|g" \
-e 's|/mnt/\([A-Za-z]\)/\([^ ]*\)|\1:/\2|g' \
-e 's|/|\\|g'