XCode is the development environment provided by Apple and it contains a set of tools useful for development.
One of this tools is XCode Command Line Tool that
[…] gives terminal users many commonly used tools, utilities, and compilers, including make, GCC, clang, perl, svn, git, size, strip, strings, libtool, cpp, what, and many other useful commands that are usually found in default linux installations.
To install XCode Command Line Tools, you DON’T have to first install XCode.