How to install Git Repository in Ubuntu 18.04

In this article, we will learn How to install Git Repository in Ubuntu 18.04. Git is an open source and most popular VCS for that version control system. Now you must be wondering what is the VCS control system (VCS). VCS is primarily useful for software developers. When a developer develops a software, he can store the software with the source code in the GIT repository. You can make a duplicate copy of the archived software to make changes to the source code over time. The advantage of the Git repository is that if you make a mistake on the source code during editing, it will not affect your live software and you can correct the mistake by comparing it to the previously released source code.

Git is a software repository also called Git repository. All developers store their projects in the Git repository. Git was initially developed by using various programming languages, Python, Pearl, Shell, C for Linux kernel development and was released in 2005 under the GNU GPLv2 license. It is a cross-platform application that is available for major systems i.e. Linux, Microsoft. Windows, mac os Git is available for both 32-bit and 64-bit operating systems.

How to install Git Repository in Ubuntu 18.04
How to install Git Repository in Ubuntu 18.04

Follow the below steps to install Git Repository in Ubuntu 18.04:

Before starting the installation of Git repository we have to install the official PPA repository for that as it’s not a part of default repository of Ubuntu 18.04. So to install the PPA repository use the below command.

mangesh@itsmarttricks:~$ sudo add-apt-repository ppa:git-core/ppa
[sudo] password for mangesh:
The most current stable version of Git for Ubuntu.

For release candidates, go to https://launchpad.net/~git-core/+archive/candidate .
More info: https://launchpad.net/~git-core/+archive/ubuntu/ppa
Press [ENTER] to continue or Ctrl-c to cancel adding it.

Ign:1 http://dl.google.com/linux/chrome/deb stable InRelease
Get:2 http://ppa.launchpad.net/git-core/ppa/ubuntu bionic InRelease [20.7 kB]
Get:3 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Hit:4 http://in.archive.ubuntu.com/ubuntu bionic InRelease
Hit:5 http://ppa.launchpad.net/noobslab/apps/ubuntu bionic InRelease
Hit:6 http://dl.google.com/linux/chrome/deb stable Release
Hit:7 http://in.archive.ubuntu.com/ubuntu bionic-updates InRelease
Ign:8 http://ppa.launchpad.net/philip5/extra/ubuntu bionic InRelease
Hit:10 http://in.archive.ubuntu.com/ubuntu bionic-backports InRelease

After installing the official PPA repository, update the Ubuntu 18.04 package and the repository using the command below to take effect.

mangesh@itsmarttricks:~$ sudo apt-get update
Ign:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 http://in.archive.ubuntu.com/ubuntu bionic InRelease
Hit:3 http://ppa.launchpad.net/git-core/ppa/ubuntu bionic InRelease
Get:4 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Hit:5 http://in.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:6 http://ppa.launchpad.net/noobslab/apps/ubuntu bionic InRelease
Hit:7 http://dl.google.com/linux/chrome/deb stable Release
Ign:8 http://ppa.launchpad.net/philip5/extra/ubuntu bionic InRelease

Now we are ready to install the Git Repository package. So use the command below to use the same.

mangesh@itsmarttricks:~$ sudo apt-get install git
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
catdoc digikam-data digikam-private-libs ffmpegthumbs gconf-service
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
git-man liberror-perl libpcre2-8-0
Suggested packages:
git-daemon-run | git-daemon-sysvinit git-doc git-el git-email git-gui gitk
gitweb git-cvs git-mediawiki git-svn
The following NEW packages will be installed:
git git-man liberror-perl libpcre2-8-0
0 upgraded, 4 newly installed, 0 to remove and 515 not upgraded.
Need to get 7,573 kB of archives.
After this operation, 39.6 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ppa.launchpad.net/git-core/ppa/ubuntu bionic/main amd64 git-man all 1:2.21.0-0ppa1~ubuntu18.04.1 [1,622 kB]
Get:2 http://in.archive.ubuntu.com/ubuntu bionic/universe amd64 libpcre2-8-0 amd64 10.31-2 [179 kB]
Get:3 http://in.archive.ubuntu.com/ubuntu bionic/main amd64 liberror-perl all 0.17025-1 [22.8 kB]
Get:4 http://ppa.launchpad.net/git-core/ppa/ubuntu bionic/main amd64 git amd64 1:2.21.0-0ppa1~ubuntu18.04.1 [5,748 kB]

As you can see above, we have successfully installed the Git Repository package. See the commands given below.

mangesh@itsmarttricks:~$ sudo dpkg -l git
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-============-============-=================================
ii git 1:2.21.0-0pp amd64 fast, scalable, distributed revis

Also Read – How to install Clonezilla Disk Imaging Software (Partition Cloning Software) In Ubuntu

To uninstall the Git Repository package use the below command.

mangesh@itsmarttricks:~$ sudo dpkg -r git 
(Reading database ... 126681 files and directories currently installed.)
Removing git (1:2.21.0-0ppa1~ubuntu18.04.1) ...

That’s all, In this article, we have explained How to install Git Repository in Ubuntu 18.04. I hope you enjoy this article. If you like this article, then just share it. If you have any questions about this article, please comment

Share this:
WhatsApp Channel Join Now
Telegram Channel Join Now
Instagram Channel Join Now

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.