Guide to install GIT: Basic guide to installing Git on various operating systems:
Windows
Download the Git Installer: Go to the page and download the installer.
Run the Installer: Follow the prompts in the Git Setup wizard. You can choose the default options.
Verify Installation:
Open Command Prompt or PowerShell.
Type
git --version
and press Enter. You should see the installed Git version.
Mac
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:
shbrew install git
Xcode Method:
Install Xcode Command Line Tools:
shxcode-select --install
Verify Installation:
Open Terminal.
Type
git --version
and press Enter. You should see the installed Git version.
Linux
Debian/Ubuntu
Update Package Index:
shsudo apt-get update
Install Git:
shsudo apt-get install git
Verify Installation:
Open Terminal.
Type
git --version
and press Enter. You should see the installed Git version.
Red Hat/CentOS/Fedora
Install Git:
shsudo yum install git
For Fedora:
shsudo dnf install git
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:
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.