Installing Git Version Control System

Posted on February 01, 2017 in tutorial

"Software is like sex: it's better when it's free." - Linus Torvalds

Git is available for all platforms Linux, Mac OS X and Windows.

Install Git on Mac OS X

There are different ways to install Git on a Mac. If you've installed XCode (or it's Command Line Tools), Git may already be installed. To find out, open a terminal and enter git --version. Inorder to install a newer version of Git, use one of these methods:

Git for Mac Installer

The easiest way to install Git on a Mac is via the stand-alone installer:

  1. Download the latest Git for Mac installer.
  2. Follow the prompts to install Git.
  3. Open a terminal and verify the installation was successful by typing git --version
  4. Configure your Git username and email using the following command
$ git config --global user.name "Your Name" 
$ git config --global user.email "yourvalidemail@company.com"

Git for Windows stand-alone installer

  1. Download the latest Git for Windows installer.
  2. Execute the installer, finish the Git Setup wizard screen with default options.
  3. Open a Command Prompt or Git Bash (search git in all programs).
  4. Run the following commands to configure your Git username and email using the following command. These details will be associated with any commits that you create:
$ git config --global user.name "Your Name"
$ git config --global user.email "yourvalidemail@company.com"

Git for Linux (Debian/ Ubuntu)

1 From your shell, install Git using apt-get (Ubuntu 14.04) or apt (Ubuntu 16.04 or later):

$ sudo apt-get update
$ sudo apt-get install git
  1. Verify the installation was successful by typing git --version:
$ git --version
git version 2.9.2
  1. Configure your Git username and email using the following command. These details will be associated with any commits that you create:
$ git config --global user.name "Your Name"
$ git config --global user.email "yourvalidemail@company.com"

source: https://www.atlassian.com/git/tutorials/install-git