There is an updated version of this post for OS X 10.9. While the steps below should still work, I recommend checking out the new guide if you are running 10.9! There are already plenty of guides that explain the particular steps of getting Git and Github going on your mac in detail.
http://www.burnedpixel.com/blog/setting-up-git-and-github-on-your-mac/