Skip to content

Instantly share code, notes, and snippets.

@rajaraodv
Last active August 29, 2015 14:11
Show Gist options
  • Save rajaraodv/8c5160e105b33b841e41 to your computer and use it in GitHub Desktop.
Save rajaraodv/8c5160e105b33b841e41 to your computer and use it in GitHub Desktop.
Upgrading to latest Git & Github tools to latest 2.2.1
--------------------------------
Check Git version:
--------------------------------
git --version
If you don't see one of the following, you should to update:
v1.8.5.6, v1.9.5, v2.0.5, v2.1.4, and v2.2.1,
Notes:
1.9.3 - MAC Apple used to distribute a git client as part of 'developer tools'. It is installed as part XCode and for iOS development. If your terminal is using that mac-version, you will see: 1.9.3 - MAC or some number
If you are using Git Mac-client all-the-time (and never use command line), you should be good using just LATEST GitHub for Windows(https://windows.github.com/) and GitHub for Mac(https://mac.github.com/). These clients comes with bundled Git + UI so you should be good by simply installing them.
--------------------------------
Updating to latest Git 2.2.1 via command line
--------------------------------
Step 1: If you already have Homebrew..
brew update && brew upgrade
(jump to step 5)
Step 2: Update permission for homebrew
sudo chown -R $USER:admin /usr/local
Step 3: Install Homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Step 4: Install git via homebrew
brew install git
Step 5: Check if your PATH is pointing to new version..
which git
Step 6: If you still see the old version of Git, run the following
echo 'export PATH="/usr/local/bin:/usr/local/sbin:~/bin:$PATH"' >> ~/.bash_profile
source ~/.bash_profile
Step 7: Check the version again..you should see 2.2.1
git --version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment