If you have been following my blog you would know that I have been working with Git for a while but on my Vista machine. Getting started with Git can be challenging so in order to be able to easily reproduce my steps I have created 2 separate blogs about it. #1 Setting Up GitHub on Windows #2. Adding Code To GitHub Now that I will be working on an iMax i have decided to do the same. The challenge here is to learn how to install things on the Mac (this is my first week using the not configured Mac OS) and also to figure out how to link Git to my existing repo without braking my Windows configuration.
After some googling i found a helpful site courtesy of git: check it out here
Installing xCode
In order to run the make command you need to install xCode . xCode is a developer tool that will enable you to make iPhone and Mac OS applications. In order to download xCode you have to make an Apple Developer Account on their site. Once you are logged in go to the Downloads section and under Snow Leopard Downloads click on the xCode 3.2.2 and iPhone SDK link (note that by the time you do this the version may have changed).
Once the file is downloaded open the containing folder and double click on the .dmg file (i think the icon for all of these file types is a 3D box) Once you have double clicked on it you will get a pop-up window guiding you through the installation. Don’t fly through the process because one of the windows will ask you which features you want to install and not all of them are check-marked by default (i ensured all of them are). Here is a snap shot of the installation video:
When the installation finished you should see a big green check mark (the first time i run the installer it failed and i didn’t even notice). Also, if you click on the magnifying glass located in the top right corner of the desktop and type in xcode you should see it listed as an application.
Download and Install Git
In order to install Git download git-1.7.1.tar.bz2 (version might be different) from Git.
- Open the terminal application and change to the Downloads directory (assuming that where git downloaded): cd ~/Downloads
- Unzip the file: tar -xjf git-1.7.1.tar.bz2
- Switch to the Git directory: cd git-1.7.1
- Make git and put it in the /opt/git folder for easy removal: make prefix=/opt/git
- Install the compiled binaries: sudo make install prefix=/opt/git
The next step is installing man pages but since i dont have MacPorts ill go over that first
Installing MacPorts
To install MacPorts visit their download site and under the Mac OS X Package (.pkg) Installer section download the.dmg for your OS (I chose the SnowLeopard one). Once the file downloaded double click on it and an installation window will open similar to the xCode one i described above.
Setting up Man Pages
Git man pages are not yet installed so you should install them because they are very helpful
- Get them (this takes a while, use -d after port if u get stuck): sudo port install asciidoc xmlto
- make man prefix=/opt/git
- sudo make install-man prefix=/opt/git
Public keys
Check out this tutorial on setting up public keys. Now if you already have Git set up on another machine use the tutorial to generate the keys/files and then edit the files manually.
Complete
You are now ready to run git commands. Use clone to get a local copy of your repository.
- git clone git://github.com/restofURL dirName
View all of my blogs on GitHub
View all of my blogs

Pingback: Audio Date API ~ Build from Scratch « Anna on Computing
Pingback: Git Gui « The Crazed Mind of an Aspiring Developer