<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/stylesheets/rss.css" type="text/css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>has_many :thoughts: Upgrading Git on Mac OS X</title>
    <link>http://blog.kineticweb.com/articles/2009/03/07/upgrading-git-on-mac-os-x</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Musings from a Ruby on Rails development team</description>
    <item>
      <title>Upgrading Git on Mac OS X</title>
      <description>&lt;p&gt;We recently switched to git based capistrano deployments and I quickly found out that these weren&amp;#8217;t working from my MacBook Pro. I noticed that my git version was a few behind my coworker&amp;#8217;s, so I figured it was time to upgrade.&lt;/p&gt;


	&lt;p&gt;Following &lt;a href="http://blog.kineticweb.com/articles/2007/10/30/compiling-git-for-mac-os-x-leopard-10-5"&gt;Justin&amp;#8217;s original git compilation instructions&lt;/a&gt;, I downloaded and compiled the latest Git version, 1.6.2 like so:&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_shell "&gt;curl -O http://kernel.org/pub/software/scm/git/git-1.6.2.tar.gz
tar jxvf git-1.6.2.tar.gz
cd git-1.6.2
make prefix=/usr/local all
make prefix=/usr/local test &amp;amp;&amp;amp; echo $?
sudo make prefix=/usr/local install&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;When the compile was done, it gave me output like this:&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_shell "&gt;!! You have installed git-* commands to new gitexecdir.
!! Old version git-* commands still remain in bindir.
!! Mixing two versions of Git will lead to problems.
!! Please remove old version commands in bindir now.&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;Thanks to &lt;a href="https://wincent.com/wiki/Updating_to_Git_1.6.0.1"&gt;this nice posting&lt;/a&gt;, I discovered this always happens when you upgrade to 1.6 and above. Git now only puts the main git binary and a few others in your /usr/local/bin and it tucks the rest away elsewhere. That meant that all the other zillion binaries needed to be deleted from my bin. I simply did:&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_shell "&gt;cd /usr/local/bin/
ls -latr | grep git&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;Which gave me an ordered list of all the git binaries installed. The ones at the end all had today&amp;#8217;s date on them, so I knew those were the new versions. The rest I could whack. The ones I could keep were &lt;code&gt;git-upload-pack&lt;/code&gt;, &lt;code&gt;git-upload-archive&lt;/code&gt;, &lt;code&gt;git-receive-pack&lt;/code&gt;, &lt;code&gt;git&lt;/code&gt;, &lt;code&gt;git-shell&lt;/code&gt;, &lt;code&gt;git-cvsserver&lt;/code&gt;, and &lt;code&gt;gitk&lt;/code&gt;. The rest I removed like so:&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_shell "&gt;sudo rm git-var git-update-server-info git-unpack-file git-ssh-upload git-ssh-push git-ssh-pull git-ssh-fetch git-show-index git-send-pack git-peek-remote git-patch-id git-pack-redundant git-mktree git-mktag git-merge-tree git-merge-recursive git-merge-index git-local-fetch git-index-pack git-imap-send git-http-push git-http-fetch git-hash-object git-fetch-pack git-fast-import git-daemon git-convert-objects git-bisect git-write-tree git-whatchanged git-verify-tag git-verify-pack git-update-ref git-update-index git-unpack-objects git-tar-tree git-tag git-symbolic-ref git-svnimport git-svn git-submodule git-stripspace git-status git-stash git-show-ref git-show-branch git-show git-shortlog git-sh-setup git-send-email git-runstatus git-rm git-revert git-rev-parse git-rev-list git-reset git-rerere git-request-pull git-repo-config git-repack git-remote git-relink git-reflog git-rebase--interactive git-rebase git-read-tree git-quiltimport git-push git-pull git-prune-packed git-prune git-parse-remote git-pack-refs git-pack-objects git-name-rev git-mv git-mergetool git-merge-subtree git-merge-stupid git-merge-resolve git-merge-ours git-merge-one-file git-merge-octopus git-merge-file git-merge-base git-merge git-mailsplit git-mailinfo git-ls-tree git-ls-remote git-ls-files git-lost-found git-log git-instaweb git-init-db git-init git-gui git-grep git-get-tar-commit-id git-gc git-fsck-objects git-fsck git-format-patch git-for-each-ref git-fmt-merge-msg git-filter-branch git-fetch--tool git-fetch git-diff-tree git-diff-index git-diff-files git-diff git-describe git-cvsimport git-cvsexportcommit git-count-objects git-config git-commit-tree git-commit git-clone git-clean git-citool git-cherry-pick git-cherry git-checkout-index git-checkout git-check-ref-format git-check-attr git-cat-file git-bundle git-branch git-blame git-archive git-archimport git-apply git-annotate git-am git-add--interactive git-add gitjour&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;Then I just had to go back and install the manpages for the new version like so:&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_shell "&gt;curl -O http://kernel.org/pub/software/scm/git/git-manpages-1.6.2.tar.bz2
sudo tar xjv -C /usr/local/man -f git-manpages-1.6.2.tar.bz2&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;And, low and behold, I was now running git 1.6.2! What&amp;#8217;s more, my capistrano deployments work now.&lt;/p&gt;</description>
      <pubDate>Sat, 07 Mar 2009 08:11:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:04202962-c370-463c-8dd6-e2acb98f6ea2</guid>
      <author>Colin A. Bartlett</author>
      <link>http://blog.kineticweb.com/articles/2009/03/07/upgrading-git-on-mac-os-x</link>
      <category>git</category>
      <category>mac</category>
      <category>OSX</category>
    </item>
    <item>
      <title>"Upgrading Git on Mac OS X" by Andy</title>
      <description>So macports is not a binary distribution mechanism.  Think 
gentoo or freebsd.  When you install via macports, you are compiling, only passively. 

I too had problems with macports, but it had everything to do 
with not understanding it.  The macports system provides a ton
of value to me.  There are so many tools I need that OSX
just does not provide.

For my money sudo port install git-core +svn is where it's at. 
With this you get git-svn, which is pretty important in a world
where not everyone is enlightened to the ways of git.

</description>
      <pubDate>Wed, 11 Mar 2009 23:09:33 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:8d27dd70-3bd7-4a35-8cfa-e798f18b3601</guid>
      <link>http://blog.kineticweb.com/articles/2009/03/07/upgrading-git-on-mac-os-x#comment-285</link>
    </item>
    <item>
      <title>"Upgrading Git on Mac OS X" by Keith</title>
      <description>another option, a bit less involved:

sudo rm -f /usr/local/bin/git*
sudo make prefix=/usr/local install

As the t-shirt says, "Kill 'em all--let God sort them out."</description>
      <pubDate>Sun, 08 Mar 2009 12:45:54 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:368c558c-f3bc-473f-907a-1757e2684281</guid>
      <link>http://blog.kineticweb.com/articles/2009/03/07/upgrading-git-on-mac-os-x#comment-284</link>
    </item>
    <item>
      <title>"Upgrading Git on Mac OS X" by cheapRoc</title>
      <description>To each his own... honestly, years ago I ran Fink and Macports and I didn't like waiting for someone else to generate a binary package I could just as easily do myself. Try applying a security patch to a Macports bin. :/
&lt;br /&gt;&lt;br /&gt;
I used to have no idea where anything was too. Now I can either install things into their own dir's under /usr/local (/usr/local/rubinius, etc) or install them directly into /usr/local. I'm sure you can do this with ports but again, I run beta/alpha/experimental stuff sometimes.
&lt;br /&gt;&lt;br /&gt;
When I redo my laptop or OS X install, I just copy over my old /usr/local. I have no clue what /opt is.
&lt;br /&gt;&lt;br /&gt;
I read source, I tinker with source and I get paid to write source. I want the source code handy on my development machine for when I want to know how these things work or I want to extend them myself.
&lt;br /&gt;&lt;br /&gt;
Now on a production machine I would love to handle packaging myself, with my own package server. But most of the time that's not necessary/worth the time so Ubuntu generally keeps current enough.
&lt;br /&gt;&lt;br /&gt;
Final remark on the subject. I'm sure I could use the arrow keys in Emacs, but I'm much faster using C-n, C-p, C-f and C-b.</description>
      <pubDate>Sat, 07 Mar 2009 10:54:44 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:5d7e5935-6005-442f-b0ec-368e0fce126c</guid>
      <link>http://blog.kineticweb.com/articles/2009/03/07/upgrading-git-on-mac-os-x#comment-283</link>
    </item>
    <item>
      <title>"Upgrading Git on Mac OS X" by Colin</title>
      <description>@Pieter I had all kinds of problems trying to install from MacPorts. Plus, compiling is more fun. =)</description>
      <pubDate>Sat, 07 Mar 2009 09:15:09 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:777b066a-4715-4911-afc8-3b09a8d99214</guid>
      <link>http://blog.kineticweb.com/articles/2009/03/07/upgrading-git-on-mac-os-x#comment-282</link>
    </item>
    <item>
      <title>"Upgrading Git on Mac OS X" by Pieter</title>
      <description>Yeah, or just install macports and do a 'port upgrade git-core', problem solved</description>
      <pubDate>Sat, 07 Mar 2009 08:59:56 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:2daa8d42-9799-47a7-9499-eeb1b88735fe</guid>
      <link>http://blog.kineticweb.com/articles/2009/03/07/upgrading-git-on-mac-os-x#comment-281</link>
    </item>
  </channel>
</rss>
