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:
- Download the latest Git for Mac installer.
- Follow the prompts to install Git.
- Open a terminal and verify the installation was successful by typing
git --version
- 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
- Download the latest Git for Windows installer.
- Execute the installer, finish the Git Setup wizard screen with default options.
- Open a Command Prompt or Git Bash (search git in all programs).
- 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
- Verify the installation was successful by typing git --version:
$ git --version
git version 2.9.2
- 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"