Installing Git and cloning the code repository
We will be using Git to clone the sample code accompanying this book from its GitHub repository. If you already have Git installed on your computer, you can skip this section:
- To install Git on macOS, use the following command in a Terminal window:
$ brew install git
- To install Git on Windows, open a PowerShell window and use Chocolatey to install it:
PS> choco install git -y
- Finally, on a Debian or Ubuntu machine, open a Bash console and execute the following command:
$ sudo apt update && sudo apt install -y git
- Once Git has been installed, verify that it is working. On all platforms, use the following command:
$ git --version
This should output the version of Git that’s been installed. On the author’s MacBook Air, the output is as follows:
git version 2.39.1
Note
If you see an older version, then you are probably using the version that came installed with macOS by default. Use Homebrew...