如何更改Git命令行界面的语言? [英] How does one change the language of the command line interface of Git?

查看:1538
本文介绍了如何更改Git命令行界面的语言?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的Linux安装中改变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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆