git
is a program that allows developers to create snapshots of their code (backups) so that it is very easy to go back to a previous version in case we make some big mistakes in our code, or collaborate with other developers, when we end up writing code in the same files.
On macOS, git
is installed with the Command Line Tools
package for XCode
, which is a required tool to install Homebrew (step 3.)
-
Launch the terminal app
-
Type this command and press enter
xcode-select --install
If you have Command Line Tools already installed, the above command will return an error. You can jump to step 7.
-
If you don't have the tools already installed, a popup will appear. Choose the option
Install
. -
Wait for the package to download and install.
-
Quit the terminal completely
-
Open the terminal again
-
Check that git is installed by typing the following command
git --version
The above should produce something similar to:
> git --version git version 2.24.3 (Apple Git-128)
Return to the table of comments at the top of the first page
Previous | Next |
---|---|
Step 1 Terminal Setup | Step 3 Install Homebrew |