idea terminal git log 乱码解决(2019)

之前在使用win7的时候就开始乱码了,现在升了WIN10 还是乱码,这次一定要解决!

按照网上的设置:

git config --global i18n.commitencoding utf-8
git config --global i18n.logoutputencoding gbk
git config --global gui.encoding utf-8
export LESSCHARSET=utf-8

又或者是

git config --global i18n.commitencoding utf-8
git config --global i18n.logoutputencoding utf-8
git config --global gui.encoding utf-8
export LESSCHARSET=utf-8

一直解决不了问题,渐渐的我自己摸出了解决办法,下面我有两种解决方案:

1.第一种方法:最简单的就是替换idea使用的cmd为git自己提供的git bash(别说你没有安装)

第二种:不用修改IDEA的配置,为CMD添加环境变量即可

环境变量加一个配置:

LESSCHARSET utf-8

重新启用IDEA,搞定!

参考:

猜你喜欢

转载自blog.csdn.net/i1377784455/article/details/87982684