Windows:
-
Download Git for Windows from git-scm.com.
-
Run the installer and select default options unless customization is needed.
-
Confirm installation by running
git --version
in Command Prompt or Git Bash.
macOS:
-
Open Terminal and run
git --version
to check if Git is pre-installed. -
If Git is not installed, install it via Xcode Command Line Tools with
xcode-select --install
. -
Alternatively, install Git via Homebrew:
brew install git
.
Linux:
-
Debian/Ubuntu:
sudo apt update && sudo apt install git
-
Fedora:
sudo dnf install git
-
Arch Linux:
sudo pacman -S git
-
Verify installation:
git --version
Verifying Installation
After installing Git, confirm the installation by running:
git --version
This should return the installed Git version.
Troubleshooting Common Issues
-
Command not found: Ensure Git is correctly installed and added to the system’s PATH.
-
SSL certificate issues: Update Git to the latest version and check system certificates.
-
Permission errors: Run Git commands with appropriate user permissions (
sudo
if necessary on Linux/macOS).