Building from Source
Building Git from source is straightforward and allows you the maximum control over your installation.
You can get the source directly from the Git Homepage. As of 2008-04-08, the latest version is 1.5.5.
(FYI, we are currently running 1.5.3.8 but you shouldn't encounter any issues.)
The steps for building are
tar xjvf git-<version>.tar.bz2
cd git-<version>
./configure --prefix=/usr/local
make
sudo make install
Some build notes:
- Starting in 1.5.4.x, you might run into a build error where the executable msgfmt is not found. You can resolve this by either:
- Installing gettext
- Rerunning using make NO_MSGFMT=yes
- If you're running OS X, do not build the documentation via make doc.
You'll encounter a dependency chain that cost you a fair bit of time
and might still not get you the desired result. But if you really
insist on giving it a try, take a look here.
Pre-Built Binaries
If you prefer to install pre-built binaries via a package manager, here’s an incomplete list:
- Ubuntu (Gutsy: 1.5.2.5-2build1, Feisty: 1.4.4.2-1build1)
apt-get install git-core
yum install git
- Mac OS X - Fink (1.5.3.7-2)
fink install git
- Mac OS X - MacPorts (1.5.3.7)
port install git-core