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

3

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?

sampablokuper

Posted 2011-05-01T03:41:38.793

Reputation: 2 389

As post-script to my answer: Now Git OS X is on 1.7.5, and Homebrew provides 1.7.5.1. Just saw it thanks to brew upgrade and don't need to care about downloading an installer and running it etc. :-) – Daniel Beck – 2011-05-05T18:07:19.130

Answers

5

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.

Daniel Beck

Posted 2011-05-01T03:41:38.793

Reputation: 98 421

Now Git OS X is on 1.7.5, and Homebrew provides 1.7.5.1. – Daniel Beck – 2011-05-05T18:05:56.790

Hm, seems that although Git (isn't listed as a requirement)[https://github.com/mxcl/homebrew/wiki/Installation#requirements] for Homebrew, installing Homebrew causes Git to be installed if Git isn't already installed. That in itself doesn't answer my question; but your other points do, I think, tip the balance in favour of Homebrew rather than the .dmg - assuming the user already has Homebrew installed. – sampablokuper – 2013-03-31T19:09:19.050

2

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

slhck

Posted 2011-05-01T03:41:38.793

Reputation: 182 472