git 下中文文件名乱码问题解决

0 阅读1分钟

现象:git status 中文变成 \344\270\255.txt 这类八进制转义字符打开 Git Bash / CMD / PowerShell 执行全局配置(所有仓库生效):

git config --global core.quotepath false
  • 只给当前项目生效(不加 --global):
git config core.quotepath false
  • 验证是否配置成功:
git config --get core.quotepath
# 返回 false 即正常

关闭终端重新打开,git statusgit ls-files 就能正常显示中文文件名。

image.png