I don't use Xcode itself, but do use the Xcode command line tools. I've found the simplest way to install them on a new machine is to open a terminal, try and run `git` (which isn't yet installed), and then you're automatically prompted to install the Xcode command line tools (only) and taken through it.