In this short post, you will learn how to install Git on Ubuntu 19.10 step by step. But we will also show you two ways to do it.
When a new version of Ubuntu comes out many users run to install it. It is obvious because many want to get the news quickly. However, there are other users who feel somewhat lost when arriving at this new version. So they need to install some applications but they do not know how or if everything stays the same or changes. One of these applications is GIT because many developers and even novices use it for their learning. However, in Linux, there are many things that can be done in various ways and here I will show you.
In general, GIT is an open-source version control system ideal to control and manage the different versions of any application. It is widely used in the developing world for its efficiency and ease of use.
So let’s see how to do it.
Install Git on Ubuntu 19.10
1.- Using the official repositories
Git is available from the official Ubuntu repositories so we can install it with the following command:
:~$ sudo apt install git
As you can see, it is very simple. This method is the safest and most reliable, but it has a weakness. With time GIT will publish new versions with improvements and bug fixes and we will not be able to get it from the official repositories.
2.- Using the GIT PPA repository
To always get the latest version of Git available in Ubuntu, we have a PPA repository available. So, this method is recommended for more advanced users who know how to use the repositories. It is also recommended for users who always want Git news.
First, we add the repository:
:~$ sudo add-apt-repository ppa:git-core/ppa
Then, refresh the APT cache and install Git.
:~$ sudo apt update
:~$ sudo apt install git
Now you will have Git ready to be used.
Finally, check the installed version with the following command.
You can also read an introduction to the Git branches.