问题现场解决过程
核心:设置 Git 文件路径不转义
git config --global core.quotepath false
官网解释 core.quotePath 到:1
Commands that output paths (e.g. ls-files, diff), will quote “unusual” characters in the pathname by enclosing the pathname in double-quotes and escaping those characters with backslashes in the same way C escapes control characters (e.g.
\t
for TAB,\n
for LF,\\
for backslash) or bytes with values larger than 0x80 (e.g. octal\302\265
for “micro” in UTF-8). If this variable is set to false, bytes higher than 0x80 are not considered “unusual” any more. Double-quotes, backslash and control characters are always escaped regardless of the setting of this variable. A simple space character is not considered “unusual”. Many commands can output pathnames completely verbatim using the-z
option. The default value is true.
我也不知道咋翻译。大概意思是,在UTF-8中字符大于十六进制的80的话,会被认为是不正常的字符会被转义的。所以配置一下
uqotePath=false
告诉git
你不用转义任何Path数据。我是这么理解的。 ↩︎