Installing GIT on OS-X In 3 Minutes

How to install GIT on OS-X in under 5 minutes:

curl http://kernel.org/pub/software/scm/git/git-1.6.3.3.tar.gz -O
tar xzvf git-1.6.3.3.tar.gz 
cd git-1.6.3.3
make configure 
./configure --prefix=/usr/local
NO_MSGFMT=yes make prefix=/usr/local all
sudo make install

Git should be installed on your OS-X now, which you can verify by issuing: git --version command in Terminal. However, it's a good idea to also pre-configure the default username and e-mail for your Git installation:

git config --global user.name "Your Firstname Lastname" 
git config --global user.email "username@example.com"
config --global --list

I personally, also like to set:

git config --global color.ui "auto" 

Thank you!

I just wanted to say thank you. You made what seemed like an unbelievably complex process, simple.

Cheers,
Kenny

Thanks!

Yes indeed, this worked ... all other casual attempts following other instructions on other blogs failed me, this got me there on Leopard happily ... and as promised in 3 minutes or under :)

Thanks much!

Loren

Very helpful

My thanks too. This got me closer to getting a full install than any other advice I've read.

Just in case anyone else had similar trouble to me getting git to compile under (a possibly messed up) version of OS X Tiger, here's the extra steps I had to take to get it to work after ./configure (Note: the install target in the Makefile calls all):


export NO_MSGFMT=yes
export NO_PERL_MAKEMAKER=yes
sudo make LDFLAGS="-lobjc -L/usr/X11R6/lib/" CFLAGS="-I/usr/X11R6/include/" prefix=/usr/local install

The second line avoids the Perl MakeMaker as it didn't work for me.

The -lobjc prevents the following error: ld: /usr/lib/crt1.o illegal reference to symbol: __objcInit defined in indirectly referenced dynamic library /usr/lib/libobjc.A.dylib.

Finally, the extra includes tells the make process to look for expat (required for git-http-push) in my X11R6 directory to avoid this error: expat.h: No such file or directory

I hope you don't mind me putting all this information here. I figure if other people try search for the same errors I had it would be useful if they found your tips and my additions here.

Exactly what I needed

Thanks for posting this info for 10.4. Very helpful and worked perfectly!

Freakin' awesome!

This worked like a charm!

I'm glad I spent a little more time googling around and found your simple instructions!

Thanks

Nice! Thanks. Luckily there was no dependency issues.

Nice work!

Thanks so much! Finally got git, and this was the easiest instructions I could find.

That saved my day, kudos to

That saved my day, kudos to you!
/ Vahagn

Works like a charm on Snow Leopard

Macports failed when I tried to add the variant for git-svn, but this worked great for OS X 10.6 -- thanks!