How to install the latest version of Git in Debian 9 or Ubuntu 19.04?

Windows Articles

PHP 8.0 available

PHP is one of the easiest open source programming languages to learn. Similarly, PHP is very popular and suitable for website development and can...

How to install PHP 8 on Ubuntu 20.04 / Debian 10?

Hello, friends. In this post, you will learn how to install PHP 8 on Ubuntu 20.04 / Debian 10. This way, you will be...

Learn how to control the volume of Windows using the mouse wheel.

Hi! Windows recently celebrated its 35th anniversary. Therefore, it is one of the longest lasting and most used systems currently. On the other hand,...

Install Nim programming language on Ubuntu 20.04 / Debian 10

Nowadays, almost everything is done with the help of a computer and a program. And the programs are made through a programming language. That...

Configure Samba File share Services with Ubuntu 20.04 LTS

Here, Today! let's discuss samba file share service with Ubuntu 20.04 LTS. If you need to share files between Linux and MS Windows...
angeloma
angeloma
Senior Writer and partner

Debian is a great operating system. Perhaps along with CentOS and RHEL the most stable of all Linux. Debian can do very important jobs like developing applications or being the operating system of a server. All this thanks to the fact that it is a very stable system where the software is constantly tested to obtain the best results. However, the software available in Debian is not always the most up to date and over time this can be a problem. So, with this in mind, I will teach you how to install the latest stable version of Git on Debian 9 Stretch or Ubuntu 19.04.

Install the latest version of Git from the source code

There is no reliable repository to install the latest version of Git on Debian 9 or Ubuntu 19.04. However, we can manually compile the source code. The process is not complicated and will help us to have current and fast Git.

First of all, you have to update the system.

:~$ su
:~# apt update && apt upgrade

1.- Upgrade the system
1.- Upgrade the system

Note: In case Ubuntu doesn’t have root enabled, you just need to type sudo before the commands.

After that, you need to install some packages to install Git.

:~# apt install build-essential make libssl-dev libghc-zlib-dev libcurl4-gnutls-dev libexpat1-dev gettext unzip

2.- Install some required packages
2.- Install some required packages

Then, it is necessary to know which is the latest stable version of Git. To do this, it is good to go to the program website. At the time of writing this article, it is 2.21.0 so the command to write is as follows.

:~# cd /tmp/
:~# wget wget https://github.com/git/git/archive/v2.21.0.zip -O latestgit.zip

3.- Download the Git source code
3.- Download the Git source code

Next, decompress it and move to the generated folder.

:~# unzip latestgit.zip
:~# cd git-2.21.0

Now, you can build and install Git. To do it, just run these commands:

:~# make prefix=/usr/local all
:~# make prefix=/usr/local install

4.- Install the latest version of git
4.- Install the latest version of git

Once the process is complete, you can verify which version is installed.

:~# git --version

5.- Git version
5.- Git version

With this, Git is now installed and ready to use.

Conclusion

Getting the latest version of Git in Debian 9 or Ubuntu 19.04 is not a complicated matter, however, it can be useful for the development of our applications. We have achieved this by manually compiling the application, this way it becomes simpler and safer.

Please share this post with your friends.

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article

PHP 8.0 available

PHP is one of the easiest open source programming languages to learn. Similarly, PHP is very popular and suitable for website development and can...

How to install PHP 8 on Ubuntu 20.04 / Debian 10?

Hello, friends. In this post, you will learn how to install PHP 8 on Ubuntu 20.04 / Debian 10. This way, you will be...

Learn how to control the volume of Windows using the mouse wheel.

Hi! Windows recently celebrated its 35th anniversary. Therefore, it is one of the longest lasting and most used systems currently. On the other hand,...

Install Nim programming language on Ubuntu 20.04 / Debian 10

Nowadays, almost everything is done with the help of a computer and a program. And the programs are made through a programming language. That...

Configure Samba File share Services with Ubuntu 20.04 LTS

Here, Today! let's discuss samba file share service with Ubuntu 20.04 LTS. If you need to share files between Linux and MS Windows...
x