进入git安装目录。git
etc\gitconfig文件中增长如下内容:windows
[gui] encoding = utf-8bash
[i18n] commitencoding = gbk svn
[svn] pathnameencoding = gbk工具
etc\git-completion.bash文件中增长如下内容:ui
alias ls='ls --show-control-chars --color=auto'spa
说明:使得在 Git Bash 中输入 ls 命令,能够正常显示中文文件名。htm
etc\inputrc文件中增长如下内容:utf-8
set output-meta on set convert-meta off
说明:使得在 Git Bash 中能够正常输入中文,好比中文的 commit log。
在windows下能够使用tortoise git这个可视化工具比较方便,这样就不会出现bash下的乱码问题了。