Mac、Windows下git log中文乱码

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

Mac

vim ~/.zshrc

.zshrc输入

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

猜你喜欢

转载自blog.csdn.net/zxsean/article/details/104922261