Step 1: Type the following command into the terminal
Using the terminal, we will use a set of specific phrases - or commands - that tell the computer what we want it to do. First, we want to tell the computer to install the Command Line Tool Package. This give Mac users many commonly used tools, utilities, and compilers, including make, GCC, clang, perl, svn, size, strip, strings, libtool, cpp, what—and Git. Install this package by typing the following command into your terminal and clicking enter.
$ xcode-select --install
Step 2: Test the Install
Now, let’s make sure Git has been installed successfully.
- Type the following command into the terminal:
The terminal should print something like (note that this is truncated):
usage: git [--version] [--help] [-C <path>] [-c name=value] [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path] [-p | --paginate | --no-pager] [--no-replace-objects] [--bare] [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>] <command> [<args>]