Git Installation

First, create an account on GitHub (recommended) or GitLab. Both are hosting sites for online Git repositories. You can think of a repository as a bucket containing snapshots of the state of your project and all of the code within it at a given point in time. This means that if you ever change something you should have not changed, make ammendments to bugs and other issues, or would simply like to go back to the previous version of a file, you will always have all of your versions at your disposal.

Follow the instructions below for your respective OS to set up git on your machine.

Note: We will go over a “Brief Introduction To Git” during our first session.

Mac

By deafault, you will have Git available on your Mac, but if you would like to have the absolute latest version, please folow the steps outlined in this section.

  1. Download the latest Git for Mac installer from sourceforge.
  2. Once the download finishes, open the .dmg package and follow the prompts to install Git.
  1. Open a terminal and verify the installation was successful by typing git --version:
$ git --version
git version 2.15.0

Windows

  1. Download the latest Git for Windows installer.
  2. Run the installer and you should see the Git Setup wizard screen. You can leave most of the default options as they are, except where noted below.

Note: Git Bash is an application for Microsoft Windows environments which provides an emulation layer for a Git command line experience. It is a useful option for users to interface with git through written commands. Click here for information on using Git Bash.

Please choose the following option during installation:

Follow the Next and Finish prompts to complete the installation.

  1. Open a Command Prompt or Git Bash from the Start menu to start using Git.
Linux:

On Linux, you can install git using the following commands for your respective OS.

  • Debian / Ubuntu (apt-get)

Git packages are available via apt:

  1. From your shell, install Git using apt-get (enter your password if prompted):
$ sudo apt-get update 
$ sudo apt-get install git
  1. Verify the installation was successful by typing git --version:
$ git --version
git version 2.20.1
  • Fedora (dnf/yum)

Git packages are available via both yum and dnf:

  1. From your shell, install Git using dnf (or yum, on older versions of Fedora):
$ sudo dnf install git

Or

$ sudo yum install git

Note: You may be asked to confirm the download and installation - enter y to confirm.

  1. Verify the installation was successful by typing git --version:
$ git --version
 git version 2.20.1

If your OS is not listed above, please check the installation instructions here linux-other-os.

Useful Guides & Resources:

Table of Contents