0

更改git的输出语言

Posted in git at 二月 14th, 2014 / No Comments »

linux下编译安装新版git(1.8.5.4)后,命令行下git输出全是中文,可以按以下操作将输出改回英文:

Add these lines to your .bashrc or .bash_profile to force git to display all messages in English:

# Set Git language to English
#alias git='LANG=en_GB git'
alias git='LANG=en_US.uft8 git'

The alias needs to override LC_ALL on some systems, when the environment variable LC_ALL is set, which has precedence over LANG. See the UNIX Specification – Environment Variables for further explanation.

# Set Git language to English
#alias git='LC_ALL=en_GB git'
alias git='LC_ALL=en_US.uft8 git'

In case you added these lines to .bashrc the alias will be defined when a new interactive shell gets started. In case you added it to .bash_profile the alias will be applied when logging in.

 

 

http://stackoverflow.com/questions/10633564/how-does-one-change-the-language-of-the-command-line-interface-of-git

Published in git
Tags:

No Responses to “更改git的输出语言”

Leave a Reply

请输入算式结果(看不清请点击图片)
(必须)