Due to a terrible chain of events I had to reinstall part of my software. Git among it, but a newer version.
Something changed because earlier all four evaluations were giving me a version info:
gitPath = "\"C:\\Program Files\\Git\\cmd\\git.exe\"";
(*it is also on PATH*)
Import["!git -C \"C:\\Users\" --version", "Text"] (*using PATH, escaped*)
"git version 2.9.0.windows.1"
Import["!git -C C:\\Users --version", "Text"] (*using Path, not escaped so not general*)
"git version 2.9.0.windows.1"
Import["!" <> gitPath <> " -C \"C:\\Users\" --version", "Text"]
""
Import["!" <> gitPath <> " -C C:\\Users --version", "Text"]
"git version 2.9.0.windows.1"
This basically means that calling git from Mthematica (via Import) is impossible unless you have it on PATH.
Which is an acceptable solution but I would like to understand what is the problem, the more that the third command works from a terminal:

RunProcess. It did have several annoying issued in 10.x on Windows, but those might already (hopefully!) be fixed in 10.4. You must specify the executable path and the arguments separately with RunProcess. You can also set a working directory for the process. – Szabolcs Jul 04 '16 at 12:03RunProcess[{ "C:\\Program Files\\Git\\cmd\\git.exe", "-C", "C:\\Program Files", "version" }]seems to work, thanks, I tried once but wasn't motivated enough to check what should be escaped, what not, should I use$SystemShelletc etc. – Kuba Jul 04 '16 at 12:17Run. Please try mywrapByQuotesfunction from the second section of this answer in the same way as I used it forgifsicle. Also you can be interested in the post by Rui Liu (Wolfram Technical Support) linked there. – Alexey Popkov Jul 04 '16 at 13:24