You are here

Updating Git on OS X

logoOne of the machines I use is a Mac, recently updated to OS X 10.10.1 (Yosemite)Git was already installed (thanks to XCode I guess), and I installed Mac Port a while ago. I had to update Git on the Mac, to the latest version. Here is what I did:

First, install various prerequisites for Git build:

xcode-select --install     # to install XCode Command Line Tools
sudo port selfupdate
sudo port upgrade outdated
sudo port install asciidoc
sudo port install xmlto
sudo port install docbook2X
# Git makefile uses docbook2x-texi, not docbook2texi
sudo ln -s /opt/local/bin/docbook2texi /opt/local/bin/docbook2x-texi

Then install the latest Git version:

git clone https://github.com/git/git
cd git
sudo make prefix=/usr/local install install-doc install-html install-info