When I run git --version in the Terminal, I get prompted to install the "command line developer tools":

Prompt for installing command line developer tools

What exactly do I get from these "command line developer tools", and how much disk space will the installation use up? I don't want to drag along a whole bunch of useless programs just because I want to use a single command.

(Assume that I do not want to use Homebrew, for whatever reason. The question is asking about the disk space used up by an installation of Apple's "command line developer tools").

  • 3
    As you now may have deduced from comments I deleted , git, like java, are stub binaries. Apple doesn’t ship git proper with the OS. The stub invokes an installer that will download via a network call a signed copy of the entire framework. Installer is suitable for your CPU type and patched as of when you install it as opposed to when Apple cut the GM seed of macOS. This is how Apple rolls now - same as with legal requirements in Russia where apps install you. – bmike Apr 3 at 16:55
  • Given the OPs actual problem should we edit the question to make that clearer - but then again there is a good answer to the headline question – mmmmmm Apr 4 at 8:04
  • Is there any reason why you don't want to use homebrew? It would probably be the cleanest alternative. – Eric Duminil Apr 4 at 9:14
  • @EricDuminil I was wondering whether or not there are built-in methods to install only Git on MacOS. I don't want to install yet another piece of software (Homebrew) if it can be avoided. – Flux Apr 4 at 9:19
  • @Flux: Okay. But since you want to install yet another piece of software (git), you'll have to install something. And it's easy to remove homebrew if you don't need it anymore. – Eric Duminil Apr 4 at 9:22

The installer says it requires 2.72 Gb of space. It installs a variety of Unix tools for compiling software, and other advanced usage (such as git) on the command line, including 'many other useful commands that are usually found in default linux installations' (osxdaily.com). It also includes the SDK frameworks and header files for macOS APIs. And python3.

Separating out what it is exactly that you need and what you don't is not really feasible, and may cause errors. Presumably, you're doing some kind of scripting/programming, for which other tools in the CLDT might be useful.

  • 6
    2.72 GB?! What a waste of disk space! I am not doing any kind of programming. I only need Git to place some txt files into version-control. – Flux Apr 3 at 12:23
  • 2
    Then as suggested by mmmmmm, install git separately, or use some other version control method. – benwiggy Apr 3 at 13:28
  • @Flux your reaction is correct here. By decoupling this framework from the core OS, Apple doesn’t have to patch everyone’s git - only the people that chose to install it as a feature. Millions of people no longer have git taking space on their computers, but you have to go get it one way or another. – bmike Apr 3 at 16:59
  • 5
    @EricDuminil It's not just a few command line tools: it's libraries, compilers, and everything needed to build stuff on the CLI. Considering Xcode itself is near 30 Gb, getting it down to under one tenth is pretty impressive. – benwiggy Apr 4 at 9:35
  • 1
    @benwiggy: So it's basically the equivalent of build-essentials on Ubuntu. Considering how bloated those "command line dev tools" seem to be, I find it impressive that Xcode can still be 10 times as bloated. Software providers get lazier and lazier simply because storage is getting cheaper. It's not a good trend. – Eric Duminil Apr 4 at 9:42

As @benwiggy says you cannot split up the command line tools.

However if the issue is just that you want git then there are other ways

  • Install command line git binary and associated tools from the Git downloads web page

  • Install a git GUI tool that includes its own copy of git efor example SourceTree. Other Git GUI clients are listed on the Git website

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .