Installation of Git


Let’s see how to install Git on your computers. No matter what Operating System you re using, here are the guides.

Install Git on macOS

Here are three easy ways to get Git on your Mac.

Xcode

If you’ve already installed Xcode, then you installed Git at the same time. If you haven’t installed Xcode, just open App Store and get it.

Using Homebrew

Install homebrew if you don’t have it, then run the command below in terminal:

brew install git
Using MacPorts

Install homebrew if you don’t have it, then run the command below in terminal:

sudo port install git

Install Git on Windows

Using winget tool

Install winget tool if you don’t have it, then run the command in cmd or Powershell:

winget install --id Git.Git -e --source winget
Using windows Installer

Download the windows standalone installer at git-scm.com, then just install it like any other windows app.

Download Link: https://git-scm.com/downloads/win

Install Git on Linux and Unix

Install Git on Debian and Ubuntu

For the latest stable version for your release of Debian/Ubuntu, run the command in terminal:

apt-get install git
Install Git on Fedora

Up to Fedora 21, run the command in terminal:

yum install git

For Fedora 22 and later, run the command in terminal:

dnf install git
Install Git on Arch Linux

Run the command in terminal:

  code="dnf install git
Install Git on openSUSE

Run the command in terminal:

zipper install git
Install Git on FreeBSD

Run the command in terminal:

pkg install git
dnf install git