Windows下Git Bash中文乱码
2015-06-15 20:03
495 查看
打开Git Bash
进入目录:$ cd /etc
1. 编辑 gitconfig 文件:$ vi gitconfig
文件中增加内容
[gui]
encoding = utf-8 #代码库统一使用utf-8
[i18n]
commitencoding = GB2312 #log编码,window下默认gb2312,声明后发到服务器才不会乱码
[svn]
pathnameencoding = GB2312 #支持中文路径
2. 编辑 git-completion.bash 文件:$ vi git-completion.bash
最下面添加
alias ls='ls --show-control-chars --color=auto' #ls能够正常显示中文
3. 编辑 inputrc 文件:$ vi inputrc
修改 output-meta 和 convert-meta 属性值
set output-meta on #bash中可以正常输入中文
set convert-meta off
4. 编辑 profile 文件:$ vi profile
最下面添加
export LESSHARSET=utf-8
5. 重新编译配置文件,使文件生效
$ source git-completion.bash
$ source inputrc
$ source profile
进入目录:$ cd /etc
1. 编辑 gitconfig 文件:$ vi gitconfig
文件中增加内容
[gui]
encoding = utf-8 #代码库统一使用utf-8
[i18n]
commitencoding = GB2312 #log编码,window下默认gb2312,声明后发到服务器才不会乱码
[svn]
pathnameencoding = GB2312 #支持中文路径
2. 编辑 git-completion.bash 文件:$ vi git-completion.bash
最下面添加
alias ls='ls --show-control-chars --color=auto' #ls能够正常显示中文
3. 编辑 inputrc 文件:$ vi inputrc
修改 output-meta 和 convert-meta 属性值
set output-meta on #bash中可以正常输入中文
set convert-meta off
4. 编辑 profile 文件:$ vi profile
最下面添加
export LESSHARSET=utf-8
5. 重新编译配置文件,使文件生效
$ source git-completion.bash
$ source inputrc
$ source profile
相关文章推荐
- windows下git 使用教程
- 常见的mongo shell命令
- Tip:Powershell无法连接到CAS服务器 推荐
- shell 脚本 变量自增长
- shell中$0,$?,$!等的特殊用法
- SHELL学习--shell脚本基础知识
- Linux --shell(一)
- linux shell 字符串操作(长度,查找,替换)详解
- PowerShell获取特定“描述”的虚拟机IP地址
- PowerShell获取特定“描述”的虚拟机IP地址
- PowerShell获取特定“描述”的虚拟机IP地址
- django shell 集合
- IOS 通过脚本自动打包工具 webfrogs/xcode_shell
- Mysql数据库备份,恢复Mysql的备份恢复命令执行方法 备份: shell> mysqldump release_ccxecredit> /data/release_ccxecredit_2
- shell定时创建Hive表分区
- windows2012 powershell ise无法定位IIS问题解决
- Shell排序 Java
- CentOS在VirtualBox下安装增强软件,添加共享文件夹,Xshell/Xftp的安装与使用
- SHELL EOF
- linux bash