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" git 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: theinstalltarget in the Makefile callsall):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
-lobjcprevents 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 directoryI 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!
Got en error
Got an error like this:
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [git-fast-import] Error 1
I'm using OSX 10.6 updated from OSX 10.5
Did you actually install the dev tools?
Because that symbol not found error makes me think you need to install the Developer Tools so that you actually get GCC and can then compile the source code.
Thank you for your reply. I
Thank you for your reply.
I installed the dev tools but I still get the same message.
This is another part of the log:
LINK git-fast-import
ld: warning: in /opt/local/lib/libz.dylib, file is not of required architecture
ld: warning: in /opt/local/lib/libcrypto.dylib, file is not of required architecture
Undefined symbols:
"_crc32", referenced from:
_crc32_begin in libgit.a(csum-file.o)
_sha1write in libgit.a(csum-file.o)
_check_pack_crc in libgit.a(pack-check.o)
_check_pack_crc in libgit.a(pack-check.o)
same issue here too on snow
same issue here too on snow leopard (upgrade from leopard). Any ideas?
and yes, i installed the Xcode package.
You have made a complex task
You have made a complex task very simple with your tool. I appreciate your efforts. Thank you for sharing your great blog with us.
the installation guide was
the installation guide was excellent.i never thought it would take so little time
Well, took me more tahn 3
Well, took me more tahn 3 minutes but without your help this would may take more than 10 hours, i was complety wrong with my method. Thanks so much for share.