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
- Download: Get the latest version of GIT from the official website.
- Run the Installer: Open the downloaded file and follow the on-screen instructions to install GIT.
Linux & MacOs
-
Update Package Index: Open a terminal and run:
sudo apt-get update
-
Install GIT: Execute the following command:
sudo apt-get install git
-
Verify Installation: Check if GIT is installed correctly by running:
git --version
macOS
-
Install via Homebrew: If you have Homebrew installed, open a terminal and run:
brew install git
-
Verify Installation: Check if GIT is installed correctly by running:
git --version
Configuration
Setting Your Username and Email
-
Open Terminal: Launch a terminal or command prompt.
-
Set Your Username: Run the following command, replacing
"Your Name"
with your actual name:git config --global user.name "Your Name"
-
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.