Skip to content

Instantly share code, notes, and snippets.

@digitaljhelms
digitaljhelms / gist:2931522
Created June 14, 2012 17:07
Building and installing Git from source on OS X Lion

Building and installing Git from source on OS X Lion

This outline for building and installing Git has only been tested against Mac OS X 10.7.x (Lion). While these steps may work for previous versions of Mac OS X, I cannot confirm this. Furthermore, you're on your own, if you screw something up, it's not my fault.

If you have Xcode 4, you have Git!

Xcode 4 includes the Git binary at the application level so it's available to itself (located at /Applications/Xcode.app/Contents/Developer/usr/bin/git). Additionally, Xcode 4 includes a new "Downloads" preference pane to install optional components, one of which are the Command Line Tools (similar to the Dev Tools package that shipped with older versions of Xcode) and once installed, Git (and many other utilities, such as make) is installed at the system level (located at /usr/bin).

*Note: You don't have to install Xcode to use the Command Line Tools; it can be downloaded independently from the Apple Developer site (you need to login, but it's free

module ActiveRecord
class Base
def self.random
if (c = count) != 0
find(:first, :offset =>rand(c))
end
end
end
end