GitHub Client Installation on Mac OSX

Introduction

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 URL Price
GitHub for MAC http://mac.github.com/ Free for personal Usage
Gitbox http://gitboxapp.com/ Free for personal Usage
GitX http://gitx.laullon.com/ Free for personal Usage
Atlassian – SourceTree http://www.sourcetreeapp.com/ Free for personal Usage
Collab.Net – GitEye http://www.collab.net/giteyeapp Free for personal Usage
Syntevo – SmartGit/Hg http://www.syntevo.com/smartgithg/index.html Free for personal Usage

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 1.8.2.1 Snow Leopard Universal”
  • On the screen labelled “Git 1.8.2.1 Snow Leopard Universal”, double-click on the “Git-1.8.2.1-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

Git – Installer – Extracted (1.8.2) – Installer

Git 1.8.2.1 -- Snow Leopard Intel Universal

Git Welcome Screen

GitHub - Welcome Screen

Confirm Install

Git - Install Confirm

Installation was successful

Git - Installation was succcessful

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”


Git – Installer – Extracted (1.8.2) – Uninstaller

Git - Installer - Extracted (1.8.2)

Review Install

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”

git --version

Git - Command -version

Book

Scott Chacon has a free book online.  The URL is http://git-scm.com/book.

References

References – pkgutil

One thought on “GitHub Client Installation on Mac OSX

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s