View on GitHub

using-git

Using GIT in your workflow

Installing GIT

Checking GIT Version

git --version

Even if it’s already installed, it’s probably a good idea to update to the latest version.

For Linux

If you’re on Fedora (or any closely-related RPM-based distribution, such as RHEL or CentOS), you can use dnf:

$ sudo dnf install git-all

If you’re on a Debian-based distribution, such as Ubuntu, try apt:

$ sudo apt install git-all

For other distributions see Download Git for Linux

For Windows

Follow any one of the following steps

  1. Using Installer or
  2. Git For Windows or
  3. GitHub Desktop Website

For MacOS

On Mavericks (10.9) or above you can do this simply by trying to run git from the Terminal the very first time.

Follow any one of the following steps if you don’t have git already in your machine,

  1. Using Installer or
  2. Install the Xcode Command Line Tools. or
  3. GitHub Desktop Website or
  4. If you have Homebrew already installed then run brew install git on a terminal

Source: Pro Git Book