5  Installing Git

5.1 Installing Git

Installing Git is straightforward and can be done on various operating systems. Here’s a brief guide for installing Git on Windows, macOS, and Linux.

5.1.0.1 Windows

  1. Download Git: Go to the Git for Windows website and download the installer.
  2. Run the Installer: Open the downloaded .exe file and follow the installation prompts. You can use the default settings unless you have specific preferences.
  3. Verify Installation: Open Command Prompt and type git --version to confirm that Git has been installed correctly.

5.1.0.2 macOS

  1. Install via Homebrew (recommended):
    • Install Homebrew if you don’t have it already by running:

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

      brew install git
  2. Verify Installation: Open Terminal and type git --version to confirm that Git has been installed correctly.

5.1.0.3 Linux

  1. Install via Package Manager:
    • Debian/Ubuntu:

      sudo apt-get update
      sudo apt-get install git
    • Fedora:

      sudo dnf install git
    • Arch Linux:

      sudo pacman -S git
  2. Verify Installation: Open Terminal and type git --version to confirm that Git has been installed correctly.

By following these steps, you can easily install Git on your operating system and start managing your projects efficiently.