Git is a distributed version control system used to manage changes to text files.
On Mac OS, Git is part of the Xcode command line tools. To install them:
-
Open a terminal.
-
Type the following in the terminal:
xcode-select --install
As part of installing git, install the gitbash command line environment so that the command line is consistent across Windows, OSX and Linux.
-
Click on the git installer (the
.exe
file) you downloaded to begin the installation.
- Click through the installation steps (keeping the defaults) until you reach the "Choosing the default editor used by Git" window. Select
Visual Studio Code
as the default editor. ClickNext
:
- Choose the "Use Git from the Windows Command Prompt" radio button and then click
Next
:
- Click through the next few installation windows using the defaults. On the configureing the terminal emulator to use with Git Bash window, choose the "Use Windows default console window" option:
-
Click through the rest of the install, leaving the defaults, and then click
Finish
on the last window:
Test that git is installed:
git
The terminal should print something like:
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>]