Linux git bash garbled solution

  
                

Linux is the most horrible problem with git bash. Once garbled, it will affect git bash. If you are garbled during git bash, you can use the following method to solve it.

git etc installation directory under add the following configuration information

1, /etc /gitconfig:

[gui]

encoding = utf -8 #Codebase unified with urf-8, can display Chinese in git gui

[i18n]

commitencoding = GB2312 #log encoding, default gb2312 under window, issued after the statement The server will not garbled

[svn]

pathnameencoding = GB2312 #Support Chinese path

2, /etc/git-completion.bash:

Add

alias ls=’ls –show-control-chars –color=auto’ #ls can display Chinese

at the end. I found git bash vim also garbled. Set as follows

set nu

set fileencoding=utf-8

set fileencodings=utf-8,gb18030,gb2312,gbk,big5

set ts =4

set expandtab

set autoindent

The above is a way to use git bash for garbled Linux. After treatment, git bash will be able to display Chinese correctly.

Copyright © Windows knowledge All Rights Reserved