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
Section titled “Install Git on macOS”Here are three easy ways to get Git on your Mac.
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
Section titled “Using Homebrew”Install homebrew if you don’t have it, then run the command below in terminal:
brew install git
Using MacPorts
Section titled “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
Section titled “Install Git on Windows”Using winget tool
Section titled “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
Section titled “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
Section titled “Install Git on Linux and Unix”Install Git on Debian and Ubuntu
Section titled “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
Section titled “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
Section titled “Install Git on Arch Linux”Run the command in terminal:
dnf install git
Install Git on openSUSE
Section titled “Install Git on openSUSE”Run the command in terminal:
zipper install git
Install Git on FreeBSD
Section titled “Install Git on FreeBSD”Run the command in terminal:
pkg install git
Install Git on RHEL(or any closely-related RPM-based distribution, such as CentOS)
Section titled “Install Git on RHEL(or any closely-related RPM-based distribution, such as CentOS)”dnf install git