如何更改Git命令行界面的语言? [英] How does one change the language of the command line interface of Git?
问题描述
如何做?
将这些行添加到您的〜/ .bashrc
或〜/ .bash_profile
强制git以英文显示所有邮件:
<$ p $将Git语言设置为英文
#alias git ='LANG = en_US git'
alias git ='LANG = en_GB git'
在某些系统上,别名需要覆盖 LC_ALL
,当环境变量 LC_ALL
设置为优先于 LANG
。有关详细说明,请参见 UNIX规范 - 环境变量。
$将Git语言设置为英文
#alias git ='LC_ALL = en_US git'
alias git ='LC_ALL = en_GB git'
如果您将这些行添加到〜/ .bashrc
当新的交互式shell启动时,别名将被定义。如果您将其添加到〜/ .bash_profile
,登录时将应用别名。
I`d like to change the language of git (to english) in my Linux installation and couldn´t find the settings. How to do it?
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_US git'
alias git='LANG=en_GB 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_US git'
alias git='LC_ALL=en_GB 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.
这篇关于如何更改Git命令行界面的语言?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!