git status 中文显示为数字的解决办法

git 在某些环境下,会出现中文路径数字的情况,例如:

liangxinhui@aiops:~/git_demo$ ls
中文.txt
liangxinhui@aiops:~/git_demo$ git status
On branch master

No commits yet

Untracked files:
  (use "git add ..." to include in what will be committed)

        "\344\270\255\346\226\207.txt"

nothing added to commit but untracked files present (use "git add" to track)

此时,将 git 的core.quotepath配置项设置为false,即可解决:

1
git config --global core.quotepath false