Mac、Windows下git log中文乱码

2019-02-27  本文已影响0人  zackxizi

Windows

在cmd中输入下面命令:

git config --global core.quotepath false
git config --global gui.encoding utf-8
git config --global i18n.commit.encoding utf-8
git config --global i18n.logoutputencoding utf-8
set LESSCHARSET=utf-8

参考Git17 webstorm中git中文乱码

注意,如果在IDE中依然存在乱码,在idea的Terminal中也输入上面的命令即可

Mac

vim ~/.zshrc
.zshrc输入

export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8

参考 mac下git中文乱码

上一篇 下一篇

猜你喜欢

热点阅读