Chinese garbled characters in git log under Mac and Windows

Windows

Enter the following command in 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 input

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

Guess you like

Origin blog.csdn.net/zxsean/article/details/104922261