# cd /usr/src # wget https://www.kernel.org/pub/software/scm/git/git-2.1.2.tar.gz # tar xzf git-2.1.2.tar.gz
安装git并添加到环境变量中
# cd git-2.1.2 # make prefix=/usr/local/git all # make prefix=/usr/local/git install # echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc # source /etc/bashrc