About the Author

Chris Shiflett

Hi, I'm Chris, a web developer and a founding member of Analog. I live and work in Brooklyn, NY.


Git on Snow Leopard

I've had a GitHub account for months, but I've yet to use it. After I mentionined on Twitter that I might start using it, the response was very positive. People really love Git and GitHub both.

Unsurprisingly, my Mac didn't already have git. (It's not part of the developer tools either.) GitHub has a nice help page on installing it, including one specifically on compiling from source. I chose the latter.

GitHub's help page on compiling from source is thorough enough to make it seem complicated. To show just how simple it is, here's exactly what I did:

curl -O http://kernel.org/pub/software/scm/git/git-1.6.5.2.tar.gz
tar -xvzf git-1.6.5.2.tar.gz 
cd git-1.6.5.2
make prefix=/usr/local
sudo make install prefix=/usr/local

GitHub provides very helpful instructions when you create a new project. For my new getFavicon project, the instructions were as follows:

mkdir getFavicon
cd getFavicon
git init
touch README
git add README
git commit -m 'first commit'
git remote add origin git@github.com:shiflett/getFavicon.git
git push origin master

If only discovering favicons were this easy! :-)

About This Post

Git on Snow Leopard was posted on Mon, 02 Nov 2009 at 13:31:33 GMT.

6 Comments

1. Bill Karwin's GravatarBill Karwin said:

I used macports to install git.

Mon, 02 Nov 2009 at 15:31:36 GMT Link


2. Derek's GravatarDerek said:

Not sure why you would need to compile Git from source when there's already an official pkg available for easy download and install. (That being said, since I already have MacPorts installed, I went that route instead.)

Mon, 02 Nov 2009 at 18:09:20 GMT Link


3. Chris Shiflett's GravatarChris Shiflett said:

I didn't see any official packages for Snow Leopard, and I don't use MacPorts. This was pretty easy.

Hopefully using Git is just as easy. :-)

Mon, 02 Nov 2009 at 18:25:37 GMT Link


4. Derek's GravatarDerek said:

Chris, the official packages are available in the "Download" section of the official Git site: http://git-scm.com/. There's also an OpenInGitGui app although I still don't use Git as much as I should, so I haven't really used it yet.

Tue, 03 Nov 2009 at 08:36:04 GMT Link


5. Nate Abele's GravatarNate Abele said:

I also highly recommend GitX, which is a GUI client for OSX. It isn't full-featured by any means (you still have to push and pull from the command line), but I find it very useful for reviewing histories and staging commits. It's much more Mac-friendly than git-gui.

Tue, 17 Nov 2009 at 08:06:26 GMT Link


6. Niall Kelly's GravatarNiall Kelly said:

Having tried other methods without success and looked through plenty of bloated documentation, this just works! Thank you for providing simple code that does what it's supposed to...

Mon, 15 Mar 2010 at 14:42:15 GMT Link


Post A Comment

Personal Details and Comment

Style Guide

Line breaks are converted to paragraphs. Also use:

  • <a href="" title="">text</a>1
  • <em>text</em>
  • <blockquote><p>text</p></blockquote>
  • <code>2  <?php  if ($foo) {      $foo = TRUE;  }  ?></code>
  1. Note: <code> can be used inline (e.g. in paragraphs) or in a block as shown. Include whitespace and newlines in blocks.

Please enter Chris (my first name) below. This is a primitive spam prevention technique, and I apologize for the inconvenience.

Preview and Submit

Upcoming Talks

ConFoo

10 - 12 Mar 2010

At Hilton Montréal Bonaventure, Montréal, Canada.

South by Southwest

12 - 16 Mar 2010

At Austin Convention Center, Austin, Texas.

Dutch PHP Conference

10 - 12 Jun 2010

At TBD, Amsterdam, Netherlands.

O'Reilly Open Source Convention

19 - 23 Jul 2010

At Oregon Convention Center, Portland, Oregon.

New Comments

Niall Kelly wrote:

Having tried other methods without success and looked through plenty of bloated documentation, th...

Posted in Git on Snow Leopard
liukang wrote:

I have problem with this example. In my php.ini magic_quotes_gpc is off so i'm using only addsla...

Posted in addslashes() Versus mysql_real_escape_string()
RyanTheGreat wrote:

Well, I'm not Chris, but I will do my best to address the questions raised in the comments by Ian...

Posted in Security Corner: Cross-Site Request Forgeries
Chris Shiflett wrote:

Thanks for the kind words, Simon. I'm glad you liked the tutorial. In case it's helpful, here'...

Posted in Webstock
Chris Shiflett wrote:

Hi Robin, I plan to post something about it, but it's going to be hard to express everything i...

Posted in Webstock

Browse Comments


Work and Books

Analog Essential PHP Security HTTP Developer's Handbook