Skip to content

Instantly share code, notes, and snippets.

@yanhua365
Last active December 29, 2015 09:39
Show Gist options
  • Save yanhua365/7652022 to your computer and use it in GitHub Desktop.
Save yanhua365/7652022 to your computer and use it in GitHub Desktop.
新安装Git后,配置中文编码以及用户名和电子邮件等信息
#在%GIT_HOME%\etc\git-completion.bash 这个文件中添加
alias ls='ls --show-control-chars --color=auto'
git config --global user.name "yourname"
git config --global user.email "[email protected]"
#%GIT_HOME%\etc\gitconfig,将下面显示的三个选项的字符集修改成如下
[gui]
encoding = utf-8
[i18n]
commitencoding = gbk
[svn]
pathnameencoding = gbk
#在%GIT_HOME%\etc\profile文件中检查有没有下面这一行,把字符集设置为utf-8或gbk
export LESSCHARSET=utf-8 #或gbk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment