It is easiest to install Git on Linux using the preferred package manager of your Linux distribution.
$ apt-get install git
$ yum install git # (up to Fedora 21) $ dnf install git # (Fedora 22 and later)
$ emerge --ask --verbose dev-vcs/git
$ pacman -S git
$ zypper install git
$ cd /usr/ports/devel/git
$ make install
$ pkg install developer/versioning/git
$ pkg_add git
Copied from: http://git-scm.com/download/linux
Git - Download for Linux and Unix
原文:http://www.cnblogs.com/huey/p/5084215.html