The main reason for Chinese garbled characters is that utF-8 encoding is not used (root)

Therefore, use the following command

  1. MAC and git bash use the following command
git config --global i18n.commitencoding utf-8
git config --global i18n.logoutputencoding utf-8
export LESSCHARSET=utf-8
Copy the code
  1. Windows CMD uses the command (export Windows does not have this command)
git config --global i18n.commitencoding utf-8
git config --global i18n.logoutputencoding utf-8
set LESSCHARSET=utf-8
Copy the code