在git提交的时候git commit -am "中文" 中文注释为什么会乱码
设置git 的界面编码:
git config --global gui.encoding utf-8
设置 commit log 提交时使用 utf-8 编码:
git config --global i18n.commitencoding utf-8
使得在 $ git log 时将 utf-8 编码转换成 gbk 编码:
git config --global i18n.logoutputencoding gbk
使得 git log 可以正常显示中文:
export LESSCHARSET=utf-8
采纳一下,谢谢
在环境变量里面加一个 LESSCHARSET="UTF-8" 试试。