Install Git on Windows/Mac/Linux

In the previous article we’ve learnt what is git and why do we use it. In this blog let’s look into the process of installation of Git in various platforms. Without any delay, let’s jump into it.

Install Git on Windows / Install Git on Mac / Install Git on Linux

Install Git on Windows

Git stand-alone installer for Windows

  • Download the latest version of Git here.
  • Click on the installer after downloading to open Git setup.
  • Read the terms and conditions and click next to agree.
  • Select the destination location and click next.
  • Choose the default editor in the drop down menu and click next.
  • Select “Let Git decide” radio button and click Next.
  • Click “Use Git from the command line and also from 3rd party software” and click Next.
  • Choose “Use the OpenSSL Library” option and click Next.
  • Select “Windows-style, commit Unix-style line endings” and click Next.
  • Click “Use MinTTY” option and click next.
  • Select “Default” option and click Next.
  • Select “Git Credential Manager Core” and click Next.
  • Click “Enable file system caching” and click Next.
  • Finally, click Install without selecting any options.

It’ll take a while to extract the packages and to install.

After installing select “Launch Git” and click Finish. It’ll open your Git window.

Enter the below code to configure your name and email. These details will be associated with any commits that you create:

$ git config --global user.name "Your Name" $ git config --global user.email "[email protected]"

Install Git on Mac OS X

There are several ways to install Git in Mac. Let’s look into the easiest and speediest one.

Git for Mac Installer

Let’s install Git using stand-alone installer:

  1. Download the latest git for mac installer.
  2. Follow the prompts to install Git.
  3. After installing, open Git and follow the instructions.

Enter the below code to configure your name.



$ git config --global user.name "Your Name"



Enter below code to configure email.



$ git config --global user.email "[email protected]"

Install Git on Linux

Debian/Ubuntu

Git packages are available via apt.

You can install Git from your shell using apt-get:

$sudo apt-get update
$sudo apt-get install git

Let’s check the version by the following code:

git --version

Configure your git name and username using the following code.

$ git config --global user.name "Your Name" 
$ git config --global user.email "[email protected]"

Fedora

Several dependencies are needed for Git to work. These are both available in yum and dnf:

From your shell, install the necessary dependencies, using dnf,

$ sudo dnf install curl-devel expat-devel gettext-devel openssl-devel perl-devel zlib-devel asciidoc xmlto docbook2X

You can also install using yum by using below command.

$ sudo yum install epel-release
$ sudo yum install curl-devel expat-devel gettext-devel openssl-devel perl-devel zlib-devel asciidoc xmlto docbook2X

Symlink docbook2X to the filename that the Git build expects:

$ sudo ln -s /usr/bin/db2x_docbook2texi /usr/bin/docbook2x-texi

Clone the Git source using the following command

$ git clone https://git.kernel.org/pub/scm/git/git.git
$ make all doc prefix=/usr
$ sudo make install install-doc install-html install-man prefix=/usr

These above steps are more popular ways to install Git on variety of operating systems. If you found this blog useful, share this with your friends, who wants help about it. In the next article, we will look into the process of setting up or creating a repository. I you have any doubts about the installation, leave us in the comments section below, we will get back to you shortly. Thanks for reading this blog.

We will be happy to hear your thoughts

Leave a reply

Edusera
Logo
Open chat
1
Scan the code
Hello!๐Ÿ‘‹
Can we help you?