System version: CentOS 6.4
Git version: 1.7.1, installed directly using Yum.
When you use Git status to view, if the filename is in Chinese, then the garbled (literally escaped character) is displayed, as shown in the following figure:
Chinese does not display correctly when Git views files
How to display Chinese normally?
1, the system itself to support Chinese
If your system does not support Chinese display, you will need to install the appropriate language packs and configurations. There are a lot of introductions on the Internet in this respect, it's not much to explain.
2. Modify Git's core configuration Quotepath to False
The code is as follows |
Copy Code |
$ git config core.quotepath false |
You need to use the –global parameter if the global effect is required
The code is as follows |
Copy Code |
$ git config--global core.quotepath false |
Summarize
Here quotepath can be split into quote path, which means to escape the path. If git wants to display Chinese correctly, you need system support first and then set the entry to False.