MacOS – What’s the best way to install command line utilities such as GIT

command linehomebrewmacosmacports

I'm a Windows/Linux guy that just got my Macbook Air. I do web dev, and am currently trying to setup this machine for some on-the-go development.

After some research attempts, I'm wondering: what's the best way to install command line utilities in Lion, such as GIT? Best as in easiest to install, maintain, upgrade etc.

As I understand it, there are some alternatives: macports, homebrew etc. Or in the GIT example, maybe just download the installer from their website.

Thanks.

Best Answer

I think it depends on how many tools/libraries you need to install.

If just git then use Xcode 4 which you will need for any port package. If you are doing pure HTML/Javascripy/CSS then the git installer will work.

For python and perl and similar interpreters the the language install tools can be used unless there are complex C/C++ libraries

If only a few others then build into /usr/local

However if you have several things to install or there are complex dependencies then I would use a ports package like Fink, macports or homebrew (which is best is debatable and should be a separate discussion)