后台使用git log命令时,commit log内容显示为中文乱码:
使用 git config --global i18n.logoutputencoding gbk 将输出按GBK编码显示。
设置中文字符集
LANG="zh_CN.GB18030" ;export LANG
再使用git log 命令 中文log日志显示正常
---------------------------------------------------
附其他设置命令:
设置git gui的界面编码
git config --global gui.encoding utf-8设置 commit log 提交时使用 utf-8 编码,可避免服务器上乱码,同时与linux上的提交保持一致!
git config --global i18n.commitencoding utf-8使得在 $ git log 时将 utf-8 编码转换成 gbk 编码,解决Msys bash中git log 乱码。
git config --global i18n.logoutputencoding gbk使得 git log 可以正常显示中文(配合i18n.logoutputencoding = gbk),在 /etc/profile 中添加:
export LESSCHARSET=utf-8-------------------------------