1, C:\Program Files\git\etc\git-completion.bash:
Alias ls= ' ls--show-control-chars--color=auto '
Description: Allows you to enter the LS command in Git Bash to display the Chinese file name correctly.
2, C:\Program FILES\GIT\ETC\INPUTRC:
Set Output-meta on
Set Convert-meta off
Description: Allows you to enter Chinese in Git Bash, such as a commit log in Chinese.
3, C:\Program Files\git\etc\profile:
Export Lesscharset=utf-8
Description: $ git log command Unlike other VCs, n log rolls over to the end, it will properly stop on the first page, press space key and then page back. This is accomplished by sending the log to less processing. The above is to set the less character encoding so that the $ git log can display Chinese correctly. In fact, its value is not necessarily set to utf-8, such as latin1 can also .... There is also a way to $ git–no-pager log, in the option to prohibit paging, you do not need to set the above options.
4, C:\Program Files\git\etc\gitconfig:
[GUI]
encoding = Utf-8
Description: Our code base is a unified utf-8, so setup can display the Chinese in the code normally in the Git GUI.
[i18n]
commitencoding = GB2312
Description: If this is not the case, although we use the $ git log to see their Chinese revision is no problem, but, one, our log pushed to the server will become garbled; second, the other people in Linux push the Chinese log after we pull came to look garbled. This is because our commit log is stored first in the project's. git/commit_editmsg file, and in Chinese Windows, the new file is encoded with GB2312, but Git doesn't know that the default utf-8 is sent out, so it's garbled. 。 With this, Git converts it to Utf-8 first, then sends it out, so there's no problem.
You can set git defaults to another editor:
$ git config--global core.editor "notepad"
Where notepad can be replaced with better WordPad, notepad++, etc. (although they cannot be accessed directly from the command line, you must set the PATH variable first).