Compiling Git for Mac OS X Leopard (10.5) 2
The following is the exact compilation steps I took for compiling Git onto the new retail version of Leopard. Definitely a big change since my previous article on installing in Tiger (next to pre-installed SVN, bye bye CVS!)...
Commandscurl -O http://surfnet.dl.sourceforge.net/sourceforge/expat/expat-2.0.1.tar.gz
tar zxvf expat-2.0.1.tar.gz
cd expat-2.0.1
./configure --prefix=/usr/local
make
make check
sudo make install
cd ..
curl -O http://kernel.org/pub/software/scm/git/git-1.5.3.4.tar.bz2
tar jxvf git-1.5.3.4.tar.bz2
cd git-1.5.3.4
make prefix=/usr/local all
make prefix=/usr/local test && echo $?
sudo make prefix=/usr/local install
cd ..
curl -O http://www.kernel.org/pub/software/scm/git/git-manpages-1.5.3.4.tar.bz2
sudo tar xjv -C /usr/local/man -f git-manpages-1.5.3.4.tar.bz2Notes
You may need to adjust your default MANPATH environment variable. You can either apply something along the lines of…
export MANPATH="/usr/local/man:$MANPATH"...to your .bash_login, profile or what have you. Or you can look into editing /private/etc/man.conf (or un-tar the manpages into a directory in your MANPATH already).
Also, no need to fiddle around with SVN bindings for Perl, or whatever the problem was with git-svn before.
You may also wish to surf our past articles hear on this blog for upgrading Git. The upgrading should be identical on Leopard.
Next Time
My next article will cover developing outside of a traditional distributed Git environment. Using Git to manage personal branching/merging/local copies, then committing to a main SVN repo. Happy hacking.
Updates on Git use in Mac OS X (Tiger)
Note: This article is still on using Git under Tiger (10.4.10, respectively)... Until I have time to run down to the Apple store tomorrow and do a nice clean install of Leopard onto my Macbook, I will not have the appropriate means of writing a proper article on Git use under 10.5.
This is for anyone that reads this blog, and used my previous article on compiling Git. I left the proper Git tutorials to the behmouth of external articles out there, on using Git as Rails project/deployment SCM. I’m also a firm believer in DIY, and the same applies to learning new things. Nobody ever taught me a damn subject (completely) in person on anything I use day-to-day… so DIY and…
Since my last article, actually a day ago, Geoffrey Grosenbach over at Peepcode Screencasts released Video 015, on Git. This should really, visually, help out those that are really having problems crasping the simple things in Git. There are other numerous advances in using Git with your Rails applications. So I’ll keep things DRY here…
One thing I will update you with though, a quick and simple way to update your source compiled installation of Git, by using Git’s repository itself.
# git clone git://git.kernel.org/pub/scm/git/git.git
# cd git
# make configure
# ./configure --prefix=/usr/local
# make all doc
# sudo make install install-docYou will now have a completely refreshed version of Git on your system.
Take note, Grosenbach mentions the benefits of having a compiled version of Git on your system. He does not, however, give more than a quick mention that it may be slightly difficult gathering up the proper dependency chain onto your system. That was what my previous article was for.
Enjoy, and let me know how things go for you… justin_at_kineticweb.com.
Compiling Git for Mac OS X 10.4.10 (Intel) 2
Update: Checkout the Leopard version of this OS X Git howto
The following is a step-by-step, dependency chain installation guide to getting up and running with Git on OS X.
Only one required version number was needed, docbook-xml v4.2, otherwise you can use the latest versions of the packages you will be installing, including Git (please note newer version of the below packages may require other dependencies).
You may have wget installed already, though this guide includes wget as it is not natively included in Mac OS X. This was needed to pull down docbook-xml 4.2 from the original wiki article I followed, noted at the bottom of this article.
The following tarballs were used for my installation, in alphabetical order…
asciidoc-8.2.2.tar.gz
docbook-xsl-1.73.1.tar.gz
expat-2.0.1.tar.gz
getopt-1.1.4.tar.gz
gettext-0.16.1.tar.gz
git-1.5.2.5.tar.gz
wget-1.10.2.tar.gz
xmlto-0.0.18.tar.bz2
1. Download and install expat; dead simple configure/make/make check/sudo make install
2. Download and install asciidoc; sudo ./install.sh (requires python >=2.3)
Test asciidoc by:- rm doc/asciidoc.html
- asciidoc doc/asciidoc.txt
- Should re-generate doc/asciidoc.html
3. Download and install gettext; simple configure/make/make check/sudo make install
4. Download and install getopt;- Change root Makefile LDFLAGS=-lintl
- make/sudo make install
5. Download and install wget; dead simple configure/make/sudo make install
6. Tricky part… installing xmlto (I used docbook-xsl v1.73.1, docbook-xml 4.2 was required by xmlto)- sudo mkdir /etc/xml
- sudo xmlcatalog—noout—create /etc/xml/catalog
- Download and unpack docbook-xsl
- sudo mkdir -p /usr/local/share/docbook/xsl
- mv ./docbook-xsl-1.73.1/ /usr/local/share/docbook/xsl/1.73.1
- sudo xmlcatalog—noout \
—add ‘nextCatalog’ ’’ ‘file:///usr/local/share/docbook/xsl/1.73.1/catalog.xml’ \
—create /etc/xml/catalog - sudo mkdir -p /usr/local/share/docbook/xml
- cd /usr/local/share/docbook/xml
- sudo wget -r -np -nH -l 0—cut-dirs=2 http://www.oasis-open.org/docbook/xml/4.2
- sudo xmlcatalog—noout \
—add ‘nextCatalog’ ’’ ‘file:///usr/local/share/docbook/xml/4.2/catalog.xml’ \
—create /etc/xml/catalog - Download and install xmlto; simple configure/make/sudo make install
- make prefix=/usr/local all doc
- make prefix=/usr/local test
- sudo make prefix=/usr/local install install-doc
- rails some_stupid_demo && cd some_stupid_demo
- git-init
- git-add .
- git-commit -m ‘This is the beginning of a beautiful friendship’
http://wincent.com/knowledge-base/Installing_Git_1.5.2.3_on_Mac_OS_X_Tiger Taken from above url, but shortened (with some small modifications) from the trial-and-error description above.
A helpful start to using Git for Rails development can be found by the great guys over in the UK at New Bamboo… http://blog.nbwd.co.uk/2007/8/16/using-git-for-rails-development I’ve found this to be an excellent guide, as it includes git-svn for SCM with Git using current SVN repo’s.
Everday Git can be found here… http://www.kernel.org/pub/software/scm/git/docs/everyday.html

