HOW TO INSTALL GIT REPOSITORY IN UBUNTU 16.04
Introduction
In this article we are going to learn How to install Git Repository in Ubuntu 16.04. Git is a open source and most popular VCS which is stands for Version Control System. Now you might thinking that what is Version Control System (VCS). VCS is mainly useful for software developers. When a developer develop’s a software he can store the software with it’s source code in Git repository. You can create a duplicate copy of the stored software to make changes on source code over time. The advantage of Git repository is if you made some mistake on source code during editing then it will be not effect on your live software and you can fix the mistake by comparing it with previous released source code.
Git is an software repository which is also called as Git repository. All developers stores their projects in Git Repository. Git was initially developed by Linus Torvalds using various programming languages i.e. Python, Perl, Shell, C for the purpose of Linux Kernel development and released under GNU GPLv2 license on year 2005. It’s an cross platform application available for major operating systems i.e. Linux, Microsoft Windows, MacOS. Git is available for both 32 bit and 64 bit of operating systems.
Follow the below steps to install Git Repository in Ubuntu 16.04
Before start 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 16.04. So to install the PPA repository use the below command.
elinuxbook@ubuntu:~$ sudo add-apt-repository ppa:git-core/ppa # Install the PPA repository
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
gpg: keyring `/tmp/tmpx4e1r6k4/secring.gpg' created
gpg: keyring `/tmp/tmpx4e1r6k4/pubring.gpg' created
gpg: requesting key E1DF1F24 from hkp server keyserver.ubuntu.com
gpg: /tmp/tmpx4e1r6k4/trustdb.gpg: trustdb created
gpg: key E1DF1F24: public key "Launchpad PPA for Ubuntu Git Maintainers" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
OK
Also Read :
- HOW TO CONFIGURE YUM REPOSITORY PACKAGE MANAGER IN RHEL 7/CENTOS 7
- HOW TO CONFIGURE LOCAL YUM REPOSITORY PACKAGE INSTALLER USING APACHE SERVER
After installing the official PPA repository let’s update the packages and repositories of Ubuntu 16.04 using below command to take effect.
elinuxbook@ubuntu:~$ sudo apt-get update # Update Packages & Repositories
Hit:1 http://security.ubuntu.com/ubuntu xenial-security InRelease
Hit:2 http://ppa.launchpad.net/git-core/ppa/ubuntu xenial InRelease
Hit:3 http://ppa.launchpad.net/jeffreyratcliffe/ppa/ubuntu xenial InRelease
Hit:4 http://us.archive.ubuntu.com/ubuntu xenial InRelease
Hit:5 http://ppa.launchpad.net/jtaylor/keepass/ubuntu xenial InRelease
Hit:6 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:7 http://ppa.launchpad.net/nowrep/qupzilla/ubuntu xenial InRelease
Hit:8 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease
Hit:9 http://ppa.launchpad.net/stebbins/handbrake-releases/ubuntu xenial InRelease
Hit:10 http://ppa.launchpad.net/teejee2008/ppa/ubuntu xenial InRelease
Reading package lists... Done
Now we are ready to install the Git Repository package. Hence to install the same use the below command.
elinuxbook@ubuntu:~$ sudo apt-get install git # Install Git Package Reading package lists... Done Building dependency tree Reading state information... Done The following package was automatically installed and is no longer required: libqt5x11extras5 Use 'sudo apt autoremove' to remove it. 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 217 not upgraded. Need to get 6,638 kB of archives. After this operation, 34.4 MB of additional disk space will be used. Do you want to continue? [Y/n] y ---> Enter 'y' to continue the installation
As you can see above we have successfully installed the Git Repository package. To confirm the same refer the below command.
elinuxbook@ubuntu:~$ sudo dpkg -l git # Confirm the installed Package
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.15.0-1~ppa0~ubuntu1 amd64 fast, scalable, distributed revision control system
To uninstall the Git Repository package use the below command.
elinuxbook@ubuntu:~$ sudo dpkg -r git # Uninstall the Git Package
(Reading database ... 214420 files and directories currently installed.)
Removing git (1:2.15.0-1~ppa0~ubuntu16.04.1) ...
This is how we can install Git Repository in Ubuntu 16.04. If you found this article useful then Like us, Share this post on your preferred Social media, Subscribe our Newsletter OR if you have something to say then feel free to comment on the comment box below.