git
is not installed by default on
- macOS;
- Windows;
- Debian;
- Ubuntu;
- Fedora; or
- Linux Mint
git
is installed by default on
- MX Linux;
- Lubuntu;
- XUbuntu; and
- Q4OS
To check if git
is installed on your workstation open a terminal and run the following command
git -v
If git
is installed, the command will return something equivalent to the following
git version 2.39.5
If git
is not installed, the command will return the equivalent to the following:
command not found: git
To install git
on macOS choose one of the following three procedures.
-
Install XCode
The XCode developer suite includes the XCode command line tools. And the XCode command line tools include a
git
client. -
Install just the XCode command line tools independent of XCode.
xcode-select install
-
Install HomeBrew.
HomeBrew installs the XCode command line tools as part of its own install process.
To install git
on Windows, choose one of the following four procedures.
-
Download and run the Git for Windows standalone installer
NB: this installer does not include an updater tool. To update a local
git
instance installed with this installer, download and run an updated installer application. -
If you have WinGet installed run
winget install --id Git.Git -e --source winget
.WinGet is Microsoft’s client for Microsoft’s Windows Package Manager service.
-
If you have the Chocolatey Package Manager installed run the following command in a PowerShell or Command Prompt terminal
choco install git
-
If you have the Windows Subsystem for Linux installed, run the following command from within a WSL terminal:
sudo apt install git
-
To install
git
on a deb-based Linux workstation, run the following command:sudo apt install git
-
To install
git
on an rpm-based Linux workstation, run the following command:sudo dnf install git