Git is a distributed version control system used to manage changes to text files.
On OS/X, 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.
-
Download git for windows: https://git-scm.com/download/win
-
Click on the git installer:
- Accept the license and click
Next
:
- Select the installation folder, default is fine. Click
Next
:
- Select the components to be installed, the default is fine:
- Windows Only: select start menu folder (default is fine):
- Choose the default editor used by Git. Select
Visual Studio Code
as the default editor. ClickNext
:
- Choose the "Use Git from the Windows Command Prompt" radio button and then click
Next
:
- Choose the HTTPS transport backend (the default is fine). Click
Next
:
- Configure the line ending conversions (the default is fine). Click
Next
:
- On the 'configuring the terminal emulator to use with Git Bash' window, choose the "Use Windows default console window" option:
- Configure the extra options (the defaults are fine). Click
Next
:
- VSCode should now be installing:
- 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 (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>]