Join our mailing list Subscribe Us

Guide to install GIT

Guide to install GIT: Basic guide to installing Git on various operating systems:



Windows

  1. Download the Git Installer: Go to the page and download the installer.

  2. Run the Installer: Follow the prompts in the Git Setup wizard. You can choose the default options.

  3. Verify Installation:

    • Open Command Prompt or PowerShell.

    • Type git --version and press Enter. You should see the installed Git version.

Mac

  1. Homebrew Method:

    • If you don’t have Homebrew installed, first install it by running:

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

      sh
      brew install git
      
  2. Xcode Method:

    • Install Xcode Command Line Tools:

      sh
      xcode-select --install
      
  3. Verify Installation:

    • Open Terminal.

    • Type git --version and press Enter. You should see the installed Git version.

Linux

Debian/Ubuntu

  1. Update Package Index:

    sh
    sudo apt-get update
    
  2. Install Git:

    sh
    sudo apt-get install git
    
  3. Verify Installation:

    • Open Terminal.

    • Type git --version and press Enter. You should see the installed Git version.

Red Hat/CentOS/Fedora

  1. Install Git:

    sh
    sudo yum install git
    

    For Fedora:

    sh
    sudo dnf install git
    
  2. Verify Installation:

    • Open Terminal.

    • Type git --version and press Enter. You should see the installed Git version.

Common Configuration

After installing Git, configure your user name and email:

sh
git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"

This is essential for your commits to be properly identified.