git 中提交代码时注释乱码问题

设置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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章