On Mac OS X with HomeBrew, is there any advantage to installing Git via .dmg rather than via HomeBrew?

If a Mac OS X user already has HomeBrew installed, is there any advantage to installing Git via the .dmg files for OS X linked from the Git download page rather than via HomeBrew?


IIRC, Git is required for Homebrew to work, so you most likely already have it. Let's ignore that for a while...


From the installer readme:

This installs git to /usr/local/git. Root access is required.

and creates a new directory tree containing bin, lib, share etc. there.

It also includes some Perl and Python stuff, probably dependencies so it's self-contained. You can use suspicious package to see what's inside.

There is no real package management, i.e. you likely need to re-download und run the installer for all updates, and the uninstaller is a very short shell script.


The Homebrew version installs to /usr/local, distributing its files to bin and the other folders there, like any Homebrew-installed program. It's managed by Homebrew and can be uninstalled and upgraded using it. It can also profit from possible dependencies you already installed using Homebrew, saving disk space. Depending on how you set up Homebrew, it might be possible to install/update git without entering the root password.


I can't see any reason to install git from the dmg. It's more cumbersome to install and upgrade, it's an older version (@slhck is correct), and you already have it if you use Homebrew anyway.


I don't think there's much of a difference, although running

brew install git

works unattended and is way faster and easier than

  • navigating to the Git page you linked
  • finding the link for OS X
  • finding the link for your system
  • downloading the .dmg file
  • opening it
  • double clicking the installer app
  • and running through the installer, accepting terms, selecting install location, etc.

Apart from that, Homebrew currently seems to have Git 1.7.5, whereas the downloadable Git OS X installer only has 1.7.4.4