环境:windows10、Git-2.42.0.2-64-bit.exe
1. 问题描述
客户端安装后,默认是不支持中文显示的,中文名的文件显示乱码,提交时打的标签内容也不支持中文显示。
2. 解决
新建Git全局配置文件,文件名为.gitconfig,内容如下:
[user]name = nnnnnnnnemail = mmmmmmmm@qq.coom
[core]autocrlf = falsequotepath = false
[svn]pathnameencoding = utf-8 # 支持中文路径
[i18n]commitEncoding = utf-8logOutputEncoding = utf-8
[gui]encoding = utf-8
[credential "https://gitcode.com"]provider = generic
[credential "https://gitee.com"]provider = generic
注:name 和email 要写成用户实际的信息。将该文件拷贝到C:\Users\xxxxx
xxxxx:是计算机名
如下图
3. 测试
中文显示正常: