Installing Git from Ubuntu Software APT
It is a recommended method to install the Git system from the Ubuntu Software repository.
As always, first, update and upgrade your APT.
The Git utility package is, by default, included in ubuntu’s software repositories that can be installed via APT. Just enter the following command to download and install Git.
Git requires root/sudo privileges to be installed so, enter the password to continue the installation.
When Git gets installed, you can check its verification with the following command
You can configure Git through the terminal/command-line window. It requires a global username that acts as a commit name and an email address.
Enter the following command to set a username, replace the content inside the “Younis said” with your name.
Enter the following command to set a global user email, replace the content inside the “firstname.lastname@example.org” with your user email.
Lastly, check for the changes you just made by using the following command. It lists out the changes made to the Git configuration file.
Step 4 (optional):
You can also edit these settings any time for that you have to change it via “git config command” in the terminal window.
Git is very easy to install on Ubuntu, just needs 4 commands to install and configure it. You just need an APT command to download and install the stable version from the Ubuntu repository