这里记录Git for Windows 1.8.3 在Windows XP SP3 上的设置。
这些设置也应适用于Git for Windows 1.7.10及以后的版本,但不适用于1.7.10以前的版本。因为1.7.10及以后的版本的Git repositories才原生支持Unincode。
解决问题的总的思路
能用Unicode的地方都用Unicode。
已知问题
•MSYS bash 不能输入中文(MSYS尚不能完全支持Unicode),但有替代办法(workaround)。
下载Git for Windows 1.8.3
前往 http://git-scm.com/download/win 下载最新版Git for Windows 1.8.3。现时的最新版是Git-1.8.3-preview20130601.exe
安装选项
•在 Select Components 中,选定 Use a TrueType font in all console window (not only for Git Bash)
•在 Adjusting your PATH environment 中,选定 Run Git from the windows Command Prompt\
•其他选项保留缺省值
解决MSYS bash 中ls 中文显示???问题
编辑 etc\git-completion.bash,在最后加入
alias ls='ls --show-control-chars --color=auto'
解决git status 乱码
git config --global core.quotepath false
解决gitk显示文件内容中文乱码
在%git%\etc\gitconfig文件末尾添加:
[gui]
encoding = utf-8
[i18n]
commitencoding = {utf-8|gbk}
MSYS bash中不能输入中文的替代办法
•不使用MSYS bash,使用windows自带的Command Prompt。经测试,在CMD中输入中文一切正常。
•使用MSYS bash,但在commit 时,使用 git -m,调用vim,在vim中输入中文。经测试,在bash 中的vim中输入中文一切正常。
•使用TortoiseGit。TortoiseGit是Windows 的Git GUI。支持unicode,在测试中尚未发现对中文支持的问题。安装步骤如下: •确保Git for Windows 最新版已安装好
•前往https://code.google.com/p/tortoisegit/wiki/Download?tm=2
•下载并安装TortoiseGit最新版
•下载并安装Chinese, simplified Language Pack
编辑器的选择
至此 Git for Windows 的中文文件名、中文注释等问题均已解决。但文件的内容是GBK还是Unicode是由编辑器决定的。建议使用gvim或UltraEdit32等支持Unicode的编辑器编辑文件,这样可以和Linux和Mac上的项目无缝同步。
参考资料
•
Git for Windows Unicode Support
•
Git Status 中文乱码解决
•
zrong’s Blog??git乱码解决方案汇总
•
zrong’s Blog 使用Git、Git GUI和TortoiseGit
•
Working with Git on Windows
分享到:
相关推荐
git for windows下载
64-bit Git for Windows Portable. The current source code release is version 2.19.1. If you want the newer version, you can build it from the source code.
github 在windows下的控制器(包含32位和62位安装包)
Git for Windows 2.7.3 发布了。 新特性: Git for Windows now ships with the Git Credential Manager for Windows. bug修复: We now handle UTF-8 merge and squash messages correctly in Git GUI. When ...
git for windows 中文汉化语言包,看不懂英文,英语差人士专用
Git for Windows最新安装包镜像,包含32位和64位的安装包,官网下载比较慢,分享给大家方便下载使用,安装一路next即可,使用可参考廖雪峰的教程。
Git for Windows简明使用指南
根据git源码编译并制作的汉化包 git for windows 编译并添加了部分界面的汉化。 源码版本是2.17.0, 汉化方法,将压缩包解压到git安装目录
离线安装git-1.8.3--centos7.6.1810, tar -zxvf git-1.8.3.tar.gz解压后直接执行./gitinstall.sh即可。中间有可能需要选择一次y确认安装
git for windows 自从2.4.6版本后,由于作者觉得发布包太大,删除了发布包中的多语言包。 但是在源码中还存在,本人编译并添加了部分界面的汉化。 源码版本是2.12.0,但是我个人觉得应该兼容其他版本。 汉化方法,将...
这是从github上下的git for windows的源码,
最新版本git for windows 2.24.1 64位 setup 另附其他版本下载网址 。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。...
这个软件官网下实在蛋疼,上传CSDN上,方便自己和大家下载使用
一个最新版本得Git for Windows工具,为了方便开发者查找并下载使用。
Git for Windows 2.15.1, 11月28号更新,64位版本,解压后安装
git for windows 64最新版,官方原版,亲测有效,拿去用吧
64-bit Git for Windows Setup windows版本 Git-2.20.1-64-bit 开源的分布式版本控制系统,可以有效、高速的处理从很小到非常大的项目版本管理。
You are downloading the latest (2.12.2) 64-bit version of Git for Windows. This is the most recent maintained build. It was released on 2017-04-05.
32-bit Git for Windows Setup windows版本 Git-2.20.1-32-bit 开源的分布式版本控制系统,可以有效、高速的处理从很小到非常大的项目版本管理。
官方网站下载太慢了,这里上传一下最新版本git for windows 2.21.0 32-64,以方便以后使用下载!