<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>everything's coming up sallis &#187; Jason</title>
	<atom:link href="http://blog.sallis.ca/author/jsallis/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sallis.ca</link>
	<description>my home on the interwebs</description>
	<lastBuildDate>Thu, 09 Apr 2009 01:12:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>Install Git from source on OS X</title>
		<link>http://blog.sallis.ca/2009/04/install-git-from-source-on-os-x/</link>
		<comments>http://blog.sallis.ca/2009/04/install-git-from-source-on-os-x/#comments</comments>
		<pubDate>Sun, 05 Apr 2009 19:16:44 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
				<category><![CDATA[Version Control]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[os x]]></category>

		<guid isPermaLink="false">http://blog.sallis.ca/?p=53</guid>
		<description><![CDATA[My version control system of choice these days is Git. Since it doesn&#8217;t come preinstalled on OS X, you have a couple of options to get it: MacPorts, packages, or install from source. Both MacPorts and packages are viable options, but when new releases of Git are made, they have to be repackaged and distributed. [...]]]></description>
			<content:encoded><![CDATA[<p>My version control system of choice these days is <a href="http://git-scm.com/">Git</a>. Since it doesn&#8217;t come preinstalled on OS X, you have a couple of options to get it: <a href="http://www.macports.org/">MacPorts</a>, <a href="http://code.google.com/p/git-osx-installer/">packages</a>, or install from <a href="http://www.kernel.org/pub/software/scm/git/">source</a>.</p>
<p>Both MacPorts and packages are viable options, but when new releases of Git are made, they have to be repackaged and distributed. So you can&#8217;t install the latest version without waiting until they&#8217;re ready. When you install from source, you can get the latest version as soon as it&#8217;s released.</p>
<p>This guide will show you how to get the latest source, install Git, install man pages, and enable bash completion. As prerequisites, I&#8217;m assuming you&#8217;re running OS X Leopard and you have <a href="http://developer.apple.com/TOOLS/xcode/">Xcode</a> installed (gcc is required for compilation).</p>
<p>First, figure out the version you want to install. You can determine the latest stable version by visiting the <a href="http://git-scm.com/">Git home page</a>. Assuming the version you want to install is 1.6.2.2 (the current version at the time of writing this post), perform the following steps:</p>
<p>1. Download the source tarball from kernel.org.</p>
<pre class="code">
curl -O http://kernel.org/pub/software/scm/git/git-1.6.2.2.tar.gz
tar -zxvf git-1.6.2.2.tar.gz
cd git-1.6.2.2
</pre>
<p>2. Configure and install. If you want to install to a different directory, change the prefix option.</p>
<pre class="code">
cd git-1.6.2.2
make configure
./configure --prefix=/usr/local
make all
sudo make install
</pre>
<p>3. Get and install man pages.</p>
<pre class="code">
curl -O http://www.kernel.org/pub/software/scm/git/git-manpages-1.6.2.2.tar.gz
sudo tar -zxvf git-manpages-1.6.2.2.tar.gz -C /usr/local/share/man
</pre>
<p>4. Enable bash completion for Git. If you don&#8217;t have bash-completion installed, skip this step. I have-bash completion installed via <a href="http://trac.macports.org/wiki/howto/bash-completion">MacPorts</a>. Yours may be installed differently, so update your paths accordingly.</p>
<pre class="code">
sudo cp contrib/completion/git-completion.bash /opt/local/etc/bash_completion.d/git-completion
</pre>
<p>Congratulations! You now have Git installed. To verify, open up your terminal and run the following command:</p>
<pre class="code">git --version</pre>
<p>Now, to keep your Git installation up to date, simply follow the same steps with the latest version number and install the latest version over top of your current version.</p>
<p>For convenience, I have packaged up the previous steps in a simple bash script called <strong>get_git.sh</strong> available on <a href="http://github.com/jsallis/scripts/tree/master">Github</a>, which I use to keep my own Git installation up to date. Feel free to fork and use it as you see fit.</p>
<p>Now that you&#8217;re using Git, here are some resources you might want to check out:</p>
<ol>
<li><a href="https://github.com/">Github</a> &#8211; the <em>de rigueur</em> standard for Git hosting and collaboration these days</li>
<li><a href="http://gitx.frim.nl/">GitX</a> &#8211; a great Git gui available for OS X (if you&#8217;re into that kind of thing)</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://blog.sallis.ca/2009/04/install-git-from-source-on-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
