中文乱码问题
参考:https://gist.github.com/nightire/5069597
让 Git 支持 utf-8 编码
$ git config --global core.quotepath false # 显示 status 编码
$ git config --global gui.encoding utf-8 # 图形界面编码
$ git config --global i18n.commit.encoding utf-8 # 提交信息编码
$ git config --global i18n.logoutputencoding utf-8 # 输出 log 编码
$ export LESSCHARSET=utf-8
# 最后一条命令是因为 git log 默认使用 less 分页,所以需要 bash 对 less 命令进行 utf-8 编码
让 ls 命令可以显示中文名称。修改 git-completion.bash 文件:
# 在文件末尾处添加一行
alias ls="ls --show-control-chars --color"