Skip to main content

Install and Configure GIT

Introduction

This guide will walk you through installing and configuring GIT on your system. GIT is a powerful version control system that helps you track changes in your codebase and collaborate with other developers effectively.

Installation

Windows

  1. Download: Get the latest version of GIT from the official website.
  2. Run the Installer: Open the downloaded file and follow the on-screen instructions to install GIT.

Linux & MacOs

  1. Update Package Index: Open a terminal and run:

    sudo apt-get update
  2. Install GIT: Execute the following command:

    sudo apt-get install git
  3. Verify Installation: Check if GIT is installed correctly by running:

    git --version

macOS

  1. Install via Homebrew: If you have Homebrew installed, open a terminal and run:

    brew install git
  2. Verify Installation: Check if GIT is installed correctly by running:

    git --version

Configuration

Setting Your Username and Email

  1. Open Terminal: Launch a terminal or command prompt.

  2. Set Your Username: Run the following command, replacing "Your Name" with your actual name:

    git config --global user.name "Your Name"
  3. Set Your Email Address: Run the following command, replacing "Your Email" with your actual email address:

    git config --global user.email "Your Email"

Verify Configuration

To check your configuration, you can use:

git config --list

This command will display all the GIT configuration settings, including your username and email.