How do I change GIT's output to mirror my command line output?
First, all git commands are executed in a git bash
sub-shell, which explains why you see '/
'.
A '\
' is an escape character for a bash session, which is why it is not used in any bash command output.
You would need to use a git wrapper (a git.pat set in your PATH) in order to replace any /
by \
.
git.bat
:
C:\prgs\git\latest\bin\git.exe %*|C:\prgs\git\latest\usr\bin\sed.exe -e 's:/:\\\\:'
Make sure git.bat
is set before git.exe
in your %PATH%
: type where git
to check the order in which git(s) are discovered.
And replace C:\prgs\git\latest
by the path your Git is installed.
By specifying the full path for git.exe
and for sed.exe
, you are sure to use the right executable.