git commands Archives - The Linux GURUS https://thelinuxgurus.com/tag/git-commands/ Learn Linux & DevOPS from THE LINUX GURUS Thu, 06 Feb 2020 08:55:34 +0000 en-US hourly 1 https://i0.wp.com/thelinuxgurus.com/wp-content/uploads/2020/01/cropped-thelinuxgurus_transparent_name.png?fit=32%2C32&ssl=1 git commands Archives - The Linux GURUS https://thelinuxgurus.com/tag/git-commands/ 32 32 148921671 Simple way to install Git on CentOS/RHEL https://thelinuxgurus.com/simple-way-to-install-git-on-centos-rhel/ https://thelinuxgurus.com/simple-way-to-install-git-on-centos-rhel/#comments Thu, 06 Feb 2020 08:55:34 +0000 https://thelinuxgurus.com/?p=1109 Git is one an open-source, distributed version controlling system & is used for tracking changes in files/code between multiple peoples/locations. It is the most widely...

The post Simple way to install Git on CentOS/RHEL appeared first on The Linux GURUS.

]]>
Git is one an open-source, distributed version controlling system & is used for tracking changes in files/code between multiple peoples/locations. It is the most widely used version controlling system that is being used by millions of users & organizations.

Recommended Read: Install Git on Ubuntu – The Easy Way

Also Read: How to install Java on CentOS & RHEL

It is a distributed system that allows every repository on every system to act as a full-fledged repository itself with complete history & version tracking capabilities. In this tutorial, we will learn to install it on CentOS/RHEL systems. So this tutorial should work for all CentOS/RHEL versions. Here we will be discussing two methods to install git on Linux systems,

1- Using default package manager i.e. yum

2- Using source packages


Install Git on CentOS /RHEL

1- Using default package manager

Git packages are maintained on the default package repositories of CentOS. They might not be the latest packages but they will be stable packages. So to install git on CentOS using yum, we can use the following command,

# yum install git

This would install git on CentOS/RHEL. If for some reason, you need the latest or any particular version of the git, then we recommend that you use the second method for git installation.


2- Using source packages

Now to install git using the source packages, we must have all the required packages for the compilation of git source package. Use the following commands to install the required packages,

# yum install gcc perl-ExtUtils-MakeMaker

# yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel

Next, we can either download a particular version or can also install the latest git version. We will be installing the latest packages, download the latest packages with the following command,

$ wget https://github.com/git/git/archive/master.zip

The latest packages will always be available at the mentioned URL. Next, we need to unzip the downloaded package,

$ unzip master.zip

$ cd master

Next, compile & install git with the following command,

$ make prefix=/usr/local all

$ sudo make prefix=/usr/local install

This will install git on Linux machine (CentOS or RHEL). Refer to git commands cheat sheet here to learn about git usage & commands. We end this tutorial on how to install git on Linux (CentOS & RHEL). Please do send in any questions, queries or suggestions using the comment box below.

If you think we have helped you or just want to support us, please consider these:-

Connect to us: Facebook | Twitter | Linkedin

TheLinuxGURUS are thankful for your continued support.

The post Simple way to install Git on CentOS/RHEL appeared first on The Linux GURUS.

]]>
https://thelinuxgurus.com/simple-way-to-install-git-on-centos-rhel/feed/ 2 1109
Install Git on Ubuntu – The Easy Way https://thelinuxgurus.com/install-git-on-ubuntu-the-easy-way/ https://thelinuxgurus.com/install-git-on-ubuntu-the-easy-way/#respond Thu, 06 Feb 2020 08:12:02 +0000 https://thelinuxgurus.com/?p=1106 Git is one an open-source & distributed version controlling system, that is used for tracking changes in files/code among multiple peoples/locations. It is the most...

The post Install Git on Ubuntu – The Easy Way appeared first on The Linux GURUS.

]]>
Git is one an open-source & distributed version controlling system, that is used for tracking changes in files/code among multiple peoples/locations. It is the most used version controlling system that is being used by millions of users & almost all the organizations use it.

It is a distributed system that allows every repository on every system to act as a full-fledged repository itself with complete history & version tracking capabilities.

Recommended Read: Ultimate guide to install PYTHON from source

Also Read: Complete guide to install Anaconda on Ubuntu

It was created by Linus Torvalds for Linux kernel development. It is free software & distributed under the terms of GNU General Public License. In this tutorial, we will learn to install git on Ubuntu systems. So this tutorial should work for all Ubuntu versions. Here we will be discussing two methods to install git on Ubuntu, i.e.,

1- Using default package manager

2- Using source packages


Install Git on Ubuntu

1- Using default package manager

Git packages are maintained on the default package repositories for Ubuntu. They might not be the latest packages but they will be stable packages. So to install git on Ubuntu using apt, we can use the following command,

$ sudo apt-get update

$ sudo apt-get install git

This would install git on Ubuntu. If for some reason, you need the latest or any particular version of the git, then we recommend that you use the second method for git installation.


2- Using source packages

Before we proceed with git installation using the source packages, we must have all the required packages for the compilation of git source package. Install the required packages using the following command,

$ sudo apt-get update

$ sudo apt-get install build-essential libssl-dev libcurl4-gnutls-dev libexpat1-dev gettext unzip

Now we can either download a particular version or can also install the latest git version, for this tutorial i will be installing the latest packages. So first, we will download the latest packages,

$ wget https://github.com/git/git/archive/master.zip

The latest packages will always be available at the mentioned url. Next, we need to unzip the downloaded package,

$ unzip master.zip

$ cd master

Now compile & install git on Ubuntu with the following command,

$ make prefix=/usr/local all

$ sudo make prefix=/usr/local install

This will install git on your system. In order to use the Git, you can refer to git commands cheat sheet here. So this concludes our tutorial on how to install git on Ubuntu. Please do send in any questions, queries or suggestions using the comment box below.

If you think we have helped you or just want to support us, please consider these:-

Connect to us: Facebook | Twitter | Linkedin

TheLinuxGURUS are thankful for your continued support.

The post Install Git on Ubuntu – The Easy Way appeared first on The Linux GURUS.

]]>
https://thelinuxgurus.com/install-git-on-ubuntu-the-easy-way/feed/ 0 1106