Skip to content

Latest commit

 

History

History
115 lines (77 loc) · 2.86 KB

installing-git.md

File metadata and controls

115 lines (77 loc) · 2.86 KB

git is not installed by default on most systems

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

Install git on macOS

To install git on macOS choose one of the following three procedures.

  1. Install XCode

    The XCode developer suite includes the XCode command line tools. And the XCode command line tools include a git client.

  2. Install just the XCode command line tools independent of XCode.

    xcode-select install
  3. Install HomeBrew.

    HomeBrew installs the XCode command line tools as part of its own install process.

Install git on Windows

To install git on Windows, choose one of the following four procedures.

  1. 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.

  2. 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.

  3. If you have the Chocolatey Package Manager installed run the following command in a PowerShell or Command Prompt terminal

    choco install git
  4. If you have the Windows Subsystem for Linux installed, run the following command from within a WSL terminal:

    sudo apt install git

Install git on Linux

  1. To install git on a deb-based Linux workstation, run the following command:

    sudo apt install git
  2. To install git on an rpm-based Linux workstation, run the following command:

    sudo dnf install git