Install Git

Learn how to install Git on various platforms, including Windows, macOS, and Ubuntu.

Installing on Windows

Follow these steps to install Git on Windows:

  1. Go to the official download site of Git at https://git-scm.com/download/win and download the latest "64-bit Git for Windows Setup" Standalone Installer file for Windows.
  2. After the download is complete, simply run the .exe file by double-clicking on it and follow the installation wizard until the installation is complete.
  3. Verify the installed version of Git by executing the following command in your terminal:

  4. git --version

    This command displays the installed version of Git on your system.


Installing on Ubuntu

Follow these steps to install Git on Ubuntu:

  1. Open a terminal and execute the following commands sequentially:

  2. sudo apt-get update
    sudo apt-get install git
    sudo add-apt-repository ppa:git-core/ppa
    sudo apt update
    sudo apt install git

  3. Verify the installed version of Git by executing the following command:

  4. git --version

Installing on macOs

Follow these steps to install Git on macOs:

  1. Open the terminal.
  2. If you haven't installed Homebrew on your Mac, you can do it by typing the following command in the Terminal:

  3. /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

  4. After Homebrew is installed, you can install Git by running the following command:

  5. brew install git

  6. Verify the installed version of Git by executing the following command:

  7. git --version