时间:2020年8月17日15:09:12
问题:Git log乱码问题
hp@a-PC MINGW64 /d/p2p_web (master)
$ git config --global core.quotepath false
hp@a-PC MINGW64 /d/p2p_web (master)
$ git config --global gui.encoding utf-8
hp@a-PC MINGW64 /d/p2p_web (master)
$ git config --global i18n.commit.encoding utf-8
hp@a-PC MINGW64 /d/p2p_web (master)
$ git config --global i18n.logoutputencoding utf-8
hp@a-PC MINGW64 /d/p2p_web (master)
$ export LESSCHARSET=utf-8
解决办法如下:
在Linux及托管网站上默认的编码都是utf-8,而Windows系统默认编码不是采用utf-8,所以Git 客户端在Windows下总是会有一些问题。一个解决方案就是通过设置git编码为utf-8。
设置 Git 支持 utf-8 编码
在命令行下输入以下命令:
依次执行以下命令: