Installing Git

One of the most important habits for a programmer deals with proper version control. The Git Some Control chapter deals with this critical process.

Note

Before starting the Git installation, make sure you finished setting up terminal, VS Code, and Python on your machine.

Follow the instructions below to install the latest version of Python:

  1. Windows

  2. Mac

  3. Chromebook

Windows Users

Since you already installed Git Bash when you set up your terminal, you are good to go!

Mac Users

  1. Launch the Terminal application, or open a new terminal panel in VS Code.

  2. Type the command git --version in the terminal.

  3. If the output includes a version number, like the sample below, then you are ready to go! The actual version isn’t that important, as long as you see 2.x or higher.

    $ git --version
    git version 2.20.1
    
  4. If the output does not include a version number, then a popup will open and ask to install some tools on your computer. Accept the invitation!

  5. After the installation is done, double check that it worked by typing git --version again.

Chromebook Users

  1. Launch the Terminal application, or open a new terminal panel in VS Code.

  2. Type the command git --version in the terminal.

  3. If the output includes a version number, like the sample below, then you are ready to go! The actual version isn’t that important, as long as you see 2.x or higher.

    $ git --version
    git version 2.20.1
    
  4. If the output does not include a version number, then you will need to install the software from the terminal. Enter the command sudo apt-get install git. You will see lots of text appear as the installation runs. If you are prompted to give permission, enter y.

  5. After the installation is done, double check that it worked by typing git --version again.