(有任何问题欢迎留言或私聊 && 欢迎交流讨论哦
闲话:
查阅了好多博客都无法解决我的问题。
本来一直在windows命令行下运行git命令,然后鬼使神差的用git bash试试后,突然发现git bash不会有中文乱码问题。
之所以windios命令行会乱码是因为它采用的是GBK编码,而且git配置数据都是utf-8编码.
windows命令行下:
Git Bash下:
解决方案:
放弃windows命令行,转战git bash
首先:
G
i
t
B
a
s
h
Git Bash
GitBash 右键选择
o
p
t
i
o
n
s
−
>
T
e
x
t
options->Text
options−>Text:
L
o
c
a
l
e
Locale
Locale: 选择 zh_CN
c
h
a
r
e
c
t
o
r
s
e
t
charector set
charectorset:选择 UTF-8
然后:
G
i
t
B
a
s
h
Git Bash
GitBash 下输入命令:
git config --global i18n.commitencoding utf-8
git config --global i18n.logoutputencoding utf-8
还有一些我也不确定是否有用,你们可以查看这个博客: [传送门](https://blog.csdn.net/xl_lx/article/details/78223349)