Since what you are looking for does not seem to be specifically “how to make Git use \ in the file path”, but rather “how to make Git generate file paths with \ ", you can output via sed (which is packaged in Git Bash ) in the following way:
$ git status --s | sed 's/\//\\/g' M dir\file.py ?? dir\input001.txt ?? dir\output001.txt
and so as not to type sed every time you can set up a Git alias to do this for you:
[alias] ws = "!ws() { : git status ; git status --short $@ | sed 's/\\//\\\\/g' ; } && ws"
which will allow you to do this:
$ git ws M dir\file.py ?? dir\input001.txt ?? dir\output001.txt
Pockets
source share