GitBash Chinese garbled characters in Windows
Open Git Bash
Go to the directory: $ cd/etc
1. Edit the gitconfig file: $ vi gitconfig
Add content to the file
[Gui] encoding = UTF-8 # The code base uses UTF-8 [i18n] commitencoding = GB2312 # log encoding. The default value is gb2312 in window, after the declaration is sent to the server, no garbled [svn] pathnameencoding = GB2312 # support for Chinese paths
2. Edit git-completion.bash file: $ vi git-completion.bash
Add at the bottom
Alias ls = 'ls -- show-control-chars -- color = auto' # ls can display Chinese normally
3. Edit the inputrc file: $ vi inputrc
Modify output-meta and convert-meta attribute values
Set output-meta on # set convert-meta off in bash
4. Edit the profile file: $ vi profile
Add at the bottom
Export LESSHARSET = UTF-8
5. recompile the configuration file to make the file take effect.
$ Source git-completion.bash
$ Source inputrc
$ Source profile