how to get started with Git/GitHub version control system on Mac OS
18 August 2011 | By Nick in How to, MacOSX, Software, Technology, Web Development
Version control is one of the most important, but one of the most challenging areas in the software development process. I’d liken the experience to dental work, sometimes scary, maybe painful at times, but absolutely necessary for good health and longevity.
So, after not so pleasant experiences with: no versioning at all, versioning via IM, run-ins with SVN and others, I’m glad to finally be able to put GitHub to use to see how well it works for me and people I’m coding with.
While googling for GitHub and Mac, I was pointed to a great resource. It’s a video by the GitHub people recorded at Yahoo! Developer Network a few years back, entitled “Git, GitHub and Social Coding”
It didn’t play for me, I had to download it and watch it in iTunes. It’s a great intro to GitHub. Take some time to watch the first one or two presenters, at least. The third presenter goes very deep. If you like what you see and hear, then read on.
Step 1 is setting up your account on GitHub. As of this writing there are a few account flavors to choose from, that I’ll review some of them below. What’s important to note, is that the free version allows you to work on publicly available code repositories and create public code repositories of your own, but not private repositories.
Plans for Individual developers (summer 2011)
- free plan
- Micro – $7/mo – 5 private repositories, 1 collaborator
- Small – $12/mo – 10 private repositories, 5 collaborators
- Medium – $22/mo – 20 private repositories, 10 collaborators
Note that they do have larger plans available, but you’ll have to call to set these up. Additionally, they offer business plans, for larger groups and more repositories, that start at $25/mo and go to $200/mo.
Also important to note is that all of the plans above are hosted/stored on GitHub.com. Where security is a major concern, but you’d still like to experience all of the goodness of GitHub, they offer GitHub:fi (for Firewall Install). This can be run inside private networks.
Setting up Git is pretty easy thanks to one of the better and more descriptive help pages you’ll find. It’s good enough in fact, that it doesn’t make too much sense for me to rehash step-by-step. I will, however, describe the steps briefly and explain the spots I got stuck on, mainly due to not reading the documentation that was clearly there the whole time. There’s a fair amount of Command Line for this, but the Git folks have made it very straightforward.
The process for Mac users is to:
- download and run the “dmg” file for your version of Mac OS X, in my case, I used “git-1.7.6-x86_64-snow-leopard.dmg” from this page: http://git-scm.com/
- This is where I got stuck for a few extra minutes. Once I installed the .dmg I mistakenly stayed on the page that linked to the downloads and ran the code under Git Quick Start. What I should have done is…
- …gone back to this page… “Set Up Git” …immediately after installing and followed the steps for setting up new SSH keys
- You’ll have to copy the SSH key you generate on your Mac, into your account on GitHub.com
- Next test your configuration
- Set your username and email
- Set your GitHub token
- Once you’ve followed the steps on the help page, and you can go back to the Git Quick Start, or use the links at the bottom of the page to create your first Git repository on GitHub.
