

解决命令行中 Git 显示中文文件名乱码
source link: https://www.boris1993.com/tools/git/git-commandline-unescape-chinese-characters.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

解决命令行中 Git 显示中文文件名乱码
在用 Git 管理包含中文的文件时,会出现类似这样的 “乱码”:
1
2
3
4
5
6
7
8
9
$ git status
On branch master
Your branch is up to date with 'origin/master'.
Untracked files:
(use "git add <file>..." to include in what will be committed)
"\345\271\277\345\221\212\345\220\214\346\255\245\345\271\263\345\217\260\346\216\245\345\217\243\346\226\207\346\241\2432.0.docx.new"
nothing added to commit but untracked files present (use "git add" to track)
解决方法是配置 Git 的全局属性 core.quotepath
为 false
,即执行命令 git config --global core.quotepath false
,然后再执行 git status
,就可以看到中文正常显示了:
1
2
3
4
5
6
7
8
9
$ git status
On branch master
Your branch is up to date with 'origin/master'.
Untracked files:
(use "git add <file>..." to include in what will be committed)
广告同步平台接口文档2.0.docx.new
nothing added to commit but untracked files present (use "git add" to track)
Recommend
-
80
todo-live - 在命令行中管理解决你要做的每一件事 - NEXT
-
75
在Windows系统中进入"C:\Windows\Fonts"中找到"常规楷体",通过传输软件上传到zabbixserver服务器"/usr/share/zabbix/fonts"目录中。修改php页面指定的字体文件:vi/usr/share/zabbix/include/defines.inc.php修改define('ZBX_
-
41
下载的文件名总是「乱码」?教你把它一键变回中文 | 一日一技
-
54
由于安装英文版的系统不支持中文,出现中文文件名乱码。下面操作时在centos上安装中文支持。 1)先下载并安装两个语言包: fonts-chinese-3.02-12.el5.noarch.rpm fonts-ISO88...
-
15
Ubuntu如何删除中文文件名乱码的文件 作者: xusx 分类: Linux 发布时间: 2019-09-25 1...
-
19
Tip: 解决blender中文乱码问题康托耶夫虚拟现实从业/还是搞搞游戏的我是康托
-
19
Linux 下 zip 文件名乱码解决 本文来自依云's Blog,转载请注明。 今天同学向QQ群邮箱里上传文...
-
18
golang 解决下载文件名乱码 Safari浏览器下载文件名乱码 eflight · 大约4小时之前 · 44 次点击 ·...
-
6
每次安装完成 WordPress,都会先添加这个函数,来确保我上传的文件不至于乱码,也分享给诸位。 function new_filename($filename) { $info = pathinfo($filename); $e...
-
10
Windows上创建的文件,上传到Linux服务器,文件名乱码? 作者:刘光录 2022-11-10 15:17:43 先来说一下问题,在 Windows 下创建的一系列文件,上传到 Linux 服务器后,出现文件名乱码,导致文件无法读取的情况。
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK