Git and many other command line tools need to be installed as part of the optional Command Line Tools subsection of the Xcode IDE. The Command Line Tool package gives users many commonly used command-line tools, utilities, and compilers, including make, GCC, clang, perl, svn, git, size, strip, strings, libtool, cpp, what, etc.

Fortunately it’s very easy to install this package, and you don’t have to install Xcode first.