Next-Gen App & Browser Testing Cloud

Trusted by 2 Mn+ QAs & Devs to accelerate their release cycles

Next-Gen App & Browser Testing Cloud

How to Install Git

Updated November 30, 2026 · Written and reviewed under our editorial policy

To install Git on Windows, download the installer from git-scm.com or run winget install --id Git.Git -e --source winget. On a Mac, run xcode-select --install or brew install git. On Ubuntu or Debian, run sudo apt-get install git. Then run git --version and set your name and email.

To install and set up Git:

  • Install Git for your OS (commands above).
  • Open a new terminal and run git --version.
  • Run git config --global user.name "Your Name".
  • Run git config --global user.email "you@example.com".

Source: git-scm.com install pages for Windows, macOS and Linux, checked 2026-11-28.

Install Git on Windows

Git for Windows is the standard way to install Git on Windows, and it includes Git Bash. Download the 64-bit installer (an ARM64 build is also available) from git-scm.com/install/windows, run it, and keep the defaults unless one of these screens matters to you:

  • Choosing the default editor used by Git: Git opens this editor for commit messages. The default is Vim; pick another editor, such as VS Code, if you don't use Vim.
  • Adjusting your PATH environment: keep the recommended Git from the command line and also from 3rd-party software, so git works in Command Prompt, PowerShell and your editor, not only in Git Bash.
  • Configuring the line ending conversions: the default, Checkout Windows-style, commit Unix-style line endings, suits most Windows users who work on projects shared with Mac and Linux.

You can also install Git with winget:

winget install --id Git.Git -e --source winget

git-scm.com notes that the winget and Chocolatey packages aren't maintained by the Git for Windows project and may lag behind the installer.

Git set up? Kane CLI can run end-to-end tests on your repo from the same terminal, so you can run end-to-end tests on every commit.

Install Git on Mac

There are two common ways to install Git on a Mac: Apple's Command Line Tools or Homebrew.

  • Command Line Tools: run xcode-select --install and click Install in the dialog. You get Apple's build of Git, which is usually a little behind the latest release. Typing git in Terminal on a Mac without the tools brings up the same install prompt.
  • Homebrew: run brew install git for the current release, and brew upgrade git later to update it. If you don't have Homebrew yet, install Homebrew first.

If you use MacPorts instead, run sudo port install git.

Install Git on Linux

On Linux, install Git from your distribution's package manager (drop sudo if you're already root):

# Debian and Ubuntu
sudo apt-get update
sudo apt-get install git

# Fedora
sudo dnf install git

# Arch Linux
sudo pacman -S git

Distribution packages can be a few releases behind. On Ubuntu, the Git maintainers' PPA carries the latest stable version: run sudo add-apt-repository ppa:git-core/ppa, then sudo apt-get update and sudo apt-get install git.

Check the install

To check that Git is installed, open a new terminal window (one opened before the install may not see the updated PATH) and run:

git --version

The output starts with git version followed by the number. When we checked git-scm.com on 2026-11-28, the latest release was 2.56.1. If you have more than one Git installed, where git on Windows or which git on Mac and Linux shows which one runs.

Command Prompt showing git --version output

First-time configuration

Git's first-time configuration sets the name and email stored in every commit you make:

git config --global user.name "Your Name"
git config --global user.email "you@example.com"

Use the email address linked to your GitHub or GitLab account so your commits show up under your profile. Two more settings are worth doing now:

  • git config --global init.defaultBranch main names the first branch main in new repositories.
  • git config --global core.editor "code --wait" opens VS Code for commit messages. Skip it if you already chose an editor in the Windows installer.

Check your settings with git config --list --show-origin.

Update Git

How you update Git depends on how you installed it:

  • Windows installer: run git update-git-for-windows in Git Bash, or download and run the newest installer from git-scm.com.
  • Windows with winget: run winget upgrade --id Git.Git -e --source winget.
  • Mac with Homebrew: run brew upgrade git.
  • Mac with the Command Line Tools: install the Command Line Tools update when it appears in Software Update.
  • Linux: update through the package manager, for example sudo apt-get install --only-upgrade git or sudo dnf upgrade git.

Next step: clone a repo

With Git installed, the next step is to clone a repository, which copies a project and its history onto your computer. Here's how to clone a Git repository over HTTPS or SSH, and how to delete a Git branch once you're done with it.

Starting a new project instead? Before your first commit, generate a .gitignore so build files and secrets stay out of the repository.

Frequently Asked Questions

Is Git already installed on my Mac?

Run git --version in Terminal. If it prints a version, Git is installed, usually Apple's version from the Command Line Tools. If it isn't, macOS offers to install the Command Line Tools for you.

What is Git Bash?

Git Bash is a terminal that comes with Git for Windows. It runs a Bash shell with common Unix commands such as ls, cat and ssh, so Git commands from Mac and Linux guides work as written.

How do I update Git on Windows?

Run git update-git-for-windows in Git Bash, or download and run the newest installer from git-scm.com. If you installed Git with winget, run winget upgrade --id Git.Git -e --source winget.

Is Git the same as GitHub?

No. Git is the version control tool that runs on your computer. GitHub is a website that hosts Git repositories and adds pull requests, issues and other collaboration features; GitLab and Bitbucket do the same job.

How do I check my Git version?

Open a terminal and run git --version. It prints the installed version, for example git version 2.56.1.

Related Questions

Test Your Website on 3000+ Browsers

Get 100 minutes of automation test minutes FREE!!

Test Now...

KaneAI - Testing Assistant

World’s first AI-Native E2E testing agent.

...

TestMu AI forEnterprise

Get access to solutions built on Enterprise
grade security, privacy, & compliance

  • Advanced access controls
  • Advanced data retention rules
  • Advanced Local Testing
  • Premium Support options
  • Early access to beta features
  • Private Slack Channel
  • Unlimited Manual Accessibility DevTools Tests