git乱码处理

Windows下git乱码处理方法,包括命令行编码、环境变量与换行符配置

  • Windows git乱码处理
  1. 命令行
git config --global core.quotepath false           # 显示status编码
git config --global gui.encoding utf-8             # 图形界面编码
git config --global i18n.commit.encoding utf-8     # 提交信息编码
git config --global i18n.logoutputencoding utf-8   # 输出log编码
  1. 环境变量
set LESSCHARSET=UTF-8
  1. git 自动转换文件 换行符
#  值     远程    拉取     提交
# true     x  -> LF -> CRLF
# input    x  -> LF -> LF
# false    x  -> x  -> x
git config --global core.autocrlf false
本站有更新,点击刷新查看最新内容 ×