git config --global core.quotepath false # 设置 git status utf-8编码
git config --global gui.encoding utf-8 # 设置Git GUI界面utf-8编码
git config --global i18n.commit.encoding utf-8 # 设置commit信息utf-8编码
git config --global i18n.logoutputencoding utf-8 # 设置输出 log utf-8 编码
在~/.bashrc最后添加下面条件变量
export LESSHARESET=utf-8
然后令其生效:
source ~/.bashrc
参考:
本文介绍了如何在Git中设置全局编码为UTF-8,以便在处理中文文件和仓库时避免乱码,包括`gitconfig`命令行选项和在`.bashrc`文件中的相关配置。
812

被折叠的 条评论
为什么被折叠?



