Git是分布式的版本控制系统,使用不需要联机,创建分支与合并分支容易,推送速度快。
CentOS6.4下git安装配置,使用yum install git安装,发现自动安装的结果是版本1.7.1
一 安装问题
[root@localhost SelfGoodCode]# git --version
git version 1.7.1
下载git-1.8.0.tar.gz,解压,确认./configure prefix=/usr/local/bin/git
make时候碰见错误
a、usr/local/git/share/locale'
Can't locate ExtUtils/MakeMaker.pm in @INC (@INC contains: /usr/local/lib/perl5 /usr/local/share/perl5 /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5 /usr/share/perl5 .) at Makefile.PL line 3.
BEGIN failed--compilation aborted at Makefile.PL line 3.
解决:yum install perl-ExtUtils-MakeMaker
b、tclsh failed; using unoptimized loading
MSGFMT po/de.msg make[1]: *** [po/de.msg] Error 127
解决:yum install tcl
c、/bin/sh: msgfmt: command not found
make: *** [po/build/locale/da/LC_MESSAGES/git.mo] Error 127
解决:yum install gettext-devel
d、git clone时候提示fatal: Unable to find remote helper for 'https'
解决:yum install libcurl-devel 安装完成后,版本确认。
[root@localhost SelfGoodCode]# git --version
git version 1.8.0
二 使用问题
使用git要清楚本地是git客户端,www.github.com是托管项目的服务器(托管项目的服务器也可以自己搭建),因此,git命令分为两套,一套在操作本地文件,一套操作远程文件。
本地命令帮助用git --help查看,远程命令帮助用git remote --help查看。
(未完待续)