Git is the version control system initially developed for the Linux kernel. Nowadays it is used in many other areas and recently the Rails community has migrated from svn to git. This means that a working git client is required to install many plugins when developing a Rails application.
The best way to install git on Mac OS X is to build it from sources. The script below makes this process effortless. This script has been verified on Mac OS X 10.5.4 (Leopard) but may work on other OS X versions as well. Your mileage may vary.