Two months ago, to be exact on Feb 13th, 2013, I read Troy Hunt’s posting titled “The Ghost Who Codes: How Anonymity is Killing Your Programming Career” (http://java.dzone.com/articles/ghost-who-codes-how-anonymity).
Ever since I have being meaning to get a GitHub Account. Today I finally did.
As I am cheap and I am mostly doing so as part of Mr. Hunt’s assigned home work, I went the path of a free, publicly available repository. No Credit Cards, Nothing!
Here is a quick primer on how to install a GitHub Client on a Mac OS.
Tools – Command Line
The official tools are available @ http://git-scm.com/downloads.
The URL for the Mac OSX version is available @ http://git-scm.com/download/mac
Tools – GUI
A very good brochure of GitHub clients is available via http://git-scm.com/downloads/guis
Tools – Command Line – Install
- Download the installer for your OS
- In our case, our installer is http://git-scm.com/download/mac
- Once the installer is downloaded, launch it
- The first screen that will appear is the screen pasted below and labelled “Git 188.8.131.52 Snow Leopard Universal”
- On the screen labelled “Git 184.108.40.206 Snow Leopard Universal”, double-click on the “Git-220.127.116.11-Intel-universal-snow-leopard.pkg” icon
- The first screen displayed is the Git Welcome Screen
- The next screen is the “Standard Install on …”
- The next screen is the “Install Confimation” Screen
Installation was successful
Tools – Command Line – Uninstall
The script for the Un-installer is pasted below. The name of the file is uninstall.sh.
Here is what the uninstaller does:
- Checks the default install folder (/usr/local/git)
- If that folder is not present, the script terminates and returns 1
- The user is prompted as to whether he/she wants to continue
- Upon pressing yes, the following folders are removed /usr/local/git/, /etc/paths.d/git, and /etc/manpaths.d/git
- The pkgutil utility is invoked
if [ ! -r "/usr/local/git" ]; then echo "Git doesn't appear to be installed via this installer. Aborting" exit 1 fi echo "This will uninstall git by removing /usr/local/git/**/*, /etc/paths.d/git, /etc/manpaths.d/git" printf "Type 'yes' if you sure you wish to continue: " read response if [ "$response" == "yes" ]; then sudo rm -rf /usr/local/git/ sudo rm /etc/paths.d/git sudo rm /etc/manpaths.d/git sudo pkgutil --forget --pkgs=GitOSX\.Installer\.git[A-Za-z0-9]*\.[a-z]*.pkg echo "Uninstalled" else echo "Aborted" exit 1 fi exit 0
Uninstaller steps are:
- Right click on the downloaded file (git-xxx-intel-universal-snow-leopard.dmg)
- From the drop-down menu, select DiskImageMounter
- The screen shot below is shown
- You want the uninstall.sh file; place that file somewhere you can get to it (/tmp folder)
- Launch Terminal
- Issue “cd /tmp”
Post install, review install
Once the installation has complete, please take the following steps to review:
- Launch a new terminal window (this ensures that your environment variable such as path have been updated)
- Issue “git -version”
Scott Chacon has a free book online. The URL is http://git-scm.com/book.
References – pkgutil
- Uninstalling packages (.pkg files) on Mac OS X
- This manual page is for Mac OS X version 10.8.2