自己做网站好还是凡科,电子商务网站建设与管理项目计划书,微信公众号登录平台登录,深圳定制网站开发使用 git status 查看本地有改动但未提交的中文文件名时#xff0c;发现会显示为一串数字#xff0c;没有显示中文的文件名。具体如下所示#xff1a;$ git status# 位于分支 master# 尚未暂存以备提交的变更:# (使用 git add ... 更新要提交的内容)# (使用 发现会显示为一串数字没有显示中文的文件名。具体如下所示$ git status# 位于分支 master# 尚未暂存以备提交的变更:# (使用 git add ... 更新要提交的内容)# (使用 git checkout -- ... 丢弃工作区的改动)## 修改: 224257346216247345210266346265201.txt解决方案是设置 git 的 core.quotepath 选项为falsegit config --global core.quotepath false查看git在线帮助手册 (https://git-scm.com/docs/git-config)里面对 core.quotepath 选项说明如下core.quotePathCommands 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 302265 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.即core.quotepath 选项为 true 时会对中文字符进行转义再显示看起来就像是乱码。设置该选项为false就会正常显示中文。在一些终端上还要检查它自身的语言设置看终端是否可以正常显示中文。