Skip to main content
Git can be installed on the most common operating systems like Windows, Mac, and Linux. In fact, Git comes installed by default on most Mac and Linux machines!

Checking for Git

To see if you already have Git installed, open up your terminal application.
1

Open your terminal

  • Mac: Look for a command prompt application called “Terminal”
  • Windows: Open the windows command prompt or “Git Bash”
2

Check the Git version

Type the following command:
git version
The output will either tell you which version of Git is installed, or it will alert you that git is an unknown command.
If git is an unknown command, read further to find out how to install Git for your operating system.

Install Git Using GitHub Desktop

Installing GitHub Desktop will also install the latest version of Git if you don’t already have it. With GitHub Desktop, you get a command-line version of Git with a robust GUI.

GitHub Desktop

Download GitHub Desktop for a simple collaboration tool for Git

Install Git on Windows

1

Download the installer

Navigate to the latest Git for Windows installer and download the latest version.
2

Run the installer

Once the installer has started, follow the instructions as provided in the Git Setup wizard screen until the installation is complete.
3

Open command prompt

Open the windows command prompt (or Git Bash if you selected not to use the standard Git Windows Command Prompt during the Git installation).
4

Verify installation

Type git version to verify Git was installed.
git version
git-scm is a popular and recommended resource for downloading Git for Windows. The advantage of downloading Git from git-scm is that your download automatically starts with the latest version of Git included with the recommended command prompt, Git Bash.

Install Git on Windows through Visual Studio Code

GitHub integration is provided through the GitHub Pull Requests and Issues extension.
1

Install the extension

Install the GitHub Pull Requests and Issues extension in VS Code.
2

Sign in to GitHub

Follow the prompts to authenticate with GitHub and return to VS Code.
3

Start using Git in VS Code

You can perform actions like searching for and cloning a repository from GitHub using the Git: Clone command in the Command Palette (Ctrl+Shift+P) or by using the Clone Repository button in the Source Control view.

Learn More

Read the full VS Code GitHub documentation

Install Git on Mac

Most versions of MacOS will already have Git installed, and you can activate it through the terminal with git version. However, if you don’t have Git installed, you can install the latest version using one of several popular methods:

Install Git From an Installer

1

Download the installer

Navigate to the latest macOS Git Installer and download the latest version.
2

Run the installer

Once the installer has started, follow the instructions as provided until the installation is complete.
3

Verify installation

Open the command prompt “terminal” and type:
git version
git-scm is a popular and recommended resource for downloading Git on a Mac. The advantage of downloading Git from git-scm is that your download automatically starts with the latest version of Git.

Install Git from Homebrew

Homebrew is a popular package manager for macOS. If you already have Homebrew installed, you can follow these steps:
1

Install Git with Homebrew

Open up a terminal window and install Git using the following command:
brew install git
2

Verify installation

Once the command output has been completed, verify the installation:
git version

Install Git on Linux

Fun fact: Git was originally developed to version the Linux operating system! So, it only makes sense that it is easy to configure to run on Linux.
You can install Git on Linux through the package management tool that comes with your distribution.

Debian/Ubuntu

1

Update package list

Navigate to your command prompt shell and run the following command to make sure everything is up-to-date:
sudo apt-get update
2

Install Git

Run the following command:
sudo apt-get install git-all
3

Verify installation

Once the command output has been completed, verify the installation:
git version

Fedora

1

Install Git

Navigate to your command prompt shell and run:
sudo dnf install git-all
2

Verify installation

Once the command output has been completed, verify the installation:
git version
You can download the proper Git versions and read more about how to install on specific Linux systems in git-scm’s documentation.

Other Methods of Installing Git

Looking to install Git via the source code? Learn more here.

Next Steps

Git Overview

Learn the basics of Git and why to use it

Git Init

Initialize your first Git repository

Git Clone

Clone an existing repository

Git Status

Check the status of your repository

Build docs developers (and LLMs) love