git bash garbled problem under windows

1, /etc/gitconfig:
[gui]
    encoding = utf-8 #The code base is unified with urf-8, and Chinese can be displayed normally in git gui
[i18n]
    commitencoding = GB2312 #log encoding, the default gb2312 under the window, sent after the statement The server will not be garbled
[svn]
    pathnameencoding = GB2312 #Support Chinese path
2, /etc/git-completion.bash:
alias ls='ls --show-control-chars --color=auto' #ls can be displayed normally Chinese
3,/etc/inputrc:
set output-meta on #Bash can input Chinese normally
set convert-meta off
4,/etc/profile:
export LESSHARSET=utf-8 #$ The git log command is not like other vcs, n The log is scrolled from the beginning to the end, it will stop properly on the first page, press the space key to turn the page again. This is achieved by sending the log to less for processing. The above is to set the character encoding of less, so that $ git log can display Chinese normally.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327062950&siteId=291194637