Open a terminal and run the following commands based on your Linux distribution:
sudo apt update -y
sudo apt install git -y
sudo yum update -y
sudo yum install git -y
sudo pacman -S git
sudo dnf install git -y
After installation, check the installed Git version:
git --version
Set up your Git username and email (required for commit tracking):
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
To verify the configuration: