There are a lot of how to’s out there with several solutions including installing from source, from binaries, with an installer. Here is how I’ve done it guided by the following posts:

Compiling and installing Git on Mac OS X
Installing Git on Mac OS X Leopard

First, I downloaded git from its homepage in bz2 format.
Then, I [...]

The main trick is not to mix pear as is /usr/bin/pear and /usr/local/zend/bin/pear. If you have already installed PHPUnit using the default Mac OS X Pear, do not mix /usr/bin/phpunit and /usr/local/zend/bin/phpunit.
That confusion out of the way, it seems the pear installed with the zend server is far from up to date. RUpdate it as [...]