GIT客户端配置支持中文

环境:windows10、Git-2.42.0.2-64-bit.exe

1. 问题描述

客户端安装后,默认是不支持中文显示的,中文名的文件显示乱码,提交时打的标签内容也不支持中文显示。

2. 解决

新建Git全局配置文件,文件名为.gitconfig,内容如下:

python 复制代码
[user]
    name = nnnnnnnn
    email = mmmmmmmm@qq.coom
[core]
    autocrlf = false
    quotepath = false
[svn]
    pathnameencoding = utf-8  # 支持中文路径
[i18n]
    commitEncoding = utf-8
    logOutputEncoding = 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. 测试

中文显示正常:

相关推荐
KieranYin1 天前
Git_查看已删除文件的历史
git
星谐1 天前
GitX智能版本控制助手:告别Git命令行,让版本控制更高效
git
错把套路当深情1 天前
Git 常用命令大全
git
向上_503582911 天前
解决git提交冲突
git
学习使我健康1 天前
Git Submodule 深度避坑指南
git
Mapleay1 天前
git notes
git
zhougl9961 天前
非root用户,链接ssh,并上传git
运维·git·ssh
muddjsv2 天前
Git 代码同步与协作的核心命令全解析
git
历程里程碑2 天前
2. Git版本回退全攻略:轻松掌握代码时光机
大数据·c++·git·elasticsearch·搜索引擎·github·全文检索
果然_2 天前
为什么你的 PR 总是多出一堆奇怪的 commit?90% 的人都踩过这个 Git 坑
前端·git