方法一
一、桌面右击,点击“Git Bash Here”
二、在弹出的黑窗口,右击,选择“options”
三、在弹出的窗口,选择“Text”,修改如下值后,先点击“Apply”,再点击“Save”
四、关闭窗口,重现打开“Git Bash”,再次输入命令,发现乱码已经解决
git bash命令设置支持中文字符
在git bash输入如下命令:
1 2 3 4 |
git config --global gui.encoding utf-8 git config --global i18n.commitencoding utf-8 git config --global i18n.logoutputencoding utf-8 export LESSCHARSET=utf-8 |