How to Download and Install Git on Windows, macOS, and Linux

Git is the most popular version control system used by developers to track changes, collaborate, and manage source code. Whether you’re working on solo projects or collaborating through GitHub or GitLab, you’ll need Git installed on your machine to get started.

In this guide, we’ll walk you through how to download and install Git on Windows, macOS, and Linux.


πŸ“₯ Step 1: Download Git

Visit the official Git website:

πŸ”— https://git-scm.com/downloads

The page automatically detects your operating system and provides the correct download link.


πŸ–₯️ Installing Git on Windows

βœ… Steps:

  1. Go to https://git-scm.com/download/win
  2. The installer (.exe file) will start downloading automatically.
  3. Once downloaded, open the file to launch the setup wizard.
  4. Follow the installation prompts:
    • Select the default editor (e.g., Vim or Notepad++)
    • Choose default branch name (usually main)
    • Leave other settings as default unless you know what you’re customizing
  5. Click Finish when complete.

βœ… Verify Installation

Open Command Prompt and type:

git --version

You should see the installed Git version, e.g., git version 2.44.0.windows.1


🍏 Installing Git on macOS

Option 1: Install via Homebrew (Recommended)

If you have Homebrew installed:

brew install git

Option 2: Download Installer

  1. Visit https://git-scm.com/download/mac
  2. Download the .dmg file and run the installer
  3. Follow the on-screen steps

Verify Installation

Open Terminal and run:

git --version

🐧 Installing Git on Linux (Ubuntu/Debian)

Open your terminal and run:

sudo apt update
sudo apt install git

For Fedora:

sudo dnf install git

For Arch:

sudo pacman -S git

Verify Installation

git --version

πŸ”§ Post-Installation: Configure Git

Once Git is installed, set your name and email (used in your commits):

git config --global user.name "Your Name"
git config --global user.email "yo*@ex*****.com"

Optional: Set default editor

git config --global core.editor "code --wait"  # For VS Code

βœ… Summary

OSInstallation MethodCommand/Link
WindowsInstaller (.exe)git-scm.com
macOSHomebrew or Installerbrew install git or use .dmg file
LinuxPackage Manager (apt, dnf, pacman)sudo apt install git

🏁 Conclusion

Installing Git is a one-time setup that unlocks powerful collaboration and version control capabilities. Once installed, you’re ready to start cloning repositories, committing changes, and contributing to projects like a pro.

Sharing Is Caring:

Leave a Comment