从源代码进行编译安装
1. 先下载最新的 git 稳定版源码
或者 wget http://www.codemonkey.org.uk/projects/git-snapshots/git/git-latest.tar.gz
wget https://git-core.googlecode.com/files/git-1.7.10.tar.gz
2. 解压源码,并进入源码目录
3. 编译安装
可能出现的错误:
a. msgfmt: command not found
解决方法:yum install gettext
b. 安装完毕执行git,提示“git: error while loading shared libraries: libcharset.so.1: cannot open shared object file: No such file or directory”
解决方法:ln -s /usr/local/lib/libcharset.so.1 /lib/libcharset.so.1
c.: undefined reference to `dlopen' etc Makefile链接选项中增加 -ldl即可
附:Windows 环境使用 Git 的相关工具
1. Cygwin http://www.cygwin.com/附:Windows 环境使用 Git 的相关工具
2. msysGit http://msysgit.github.com/
3. TortoiseGit http://code.google.com/p/tortoisegit/