git log 中文乱码的解决方案

设置 Git 支持 utf-8 编码
在命令行下输入以下命令:
$ git config --global core.quotepath false # 显示 status 编码
$ git config --global gui.encoding utf-8 # 图形界面编码
$ git config --global i18n.commit.encoding utf-8 # 提交信息编码
$ git config --global i18n.logoutputencoding utf-8 # 输出 log 编码
$ export LESSCHARSET=utf-8

 

用 && 把命令连接起来,此命令只支持一个会话,不是永久性的

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 && export LESSCHARSET=utf-8

posted @ 2018-06-25 20:42  张发财  阅读(934)  评论(1编辑  收藏  举报