There is a binary installer that you can download. See also the Getting Started - Installing Git of the git
website:
There are several ways to install Git on a Mac. The easiest is probably to install the Xcode Command Line Tools. On Mavericks (10.9) or above you can do this simply by trying to run git from the Terminal the very first time. If you don’t have it installed already, it will prompt you to install it.
If you want a more up to date version, you can also install it via a binary installer. An OSX Git installer is maintained and available for download at the Git website, at http://git-scm.com/download/mac.
However, as @denis points out, as of July 2017, the binaries on the download page of the Git website are for 10.9 or newer. If you look at where the binary files are actually hosted, on SourceForge, there is an a FAQ about which version of the binary installer to download if you have an older version of Mac OS X/macOS:
Which version should I download?
If you are running:
10.6
Snow Leopard: git-*-snow-leopard
10.7
Lion: git-*-snow-leopard
10.8
Mountain Lion: git-*-snow-leopard
10.9
Mavericks: git-*-mavericks
10.10
Yosemite: git-*-mavericks
10.11
Yosemite [sic]: git-*-mavericks
So for 10.8, you'll want to download any binary installer that ends with the name -snow-leopard
. There are several such binary installers, but the one with the most recent version of Git is git-2.3.5-intel-universal-snow-leopard.dmg
. Here is a direct download link for it (23.1 MB): https://sourceforge.net/projects/git-osx-installer/files/git-2.3.5-intel-universal-mavericks.dmg/download