Git is a widely used OpenSource version control system for software development. It has been initially developed by Linus Torvalds and is e.g. used to manage the source code of the Linux kernel. Any type of software project can be handled in an effective way by using GIT, often in conjunction with the free GIT hosting service GitHub.
In this article, you will learn how to install and configure Git on Ubuntu 20.04 via the Command line.
In this guide, we will install GIT using the official Ubuntu packages. The installation steps are done on the Linux command line, the terminal.
First of all, you need to open a terminal by using Ctrl+Alt+T keys from the keyboard then update and upgrade the apt package lists.
Execute the following below mentioned command for update APT:
$ sudo apt update
Then enter your password as you can see in the following screenshot.
Execute the following below mentioned command for upgrade apt:
$ sudo apt upgrade
Before the upgrade starts, the system will ask one question that do you want to continue then you need to press “y” for yes.
The Git utility package is available in ubuntu’s software sources, which can be installed by APT. By just typing the following command, Git can be installed.
$ sudo apt install git
Git wants sudo rights to be installed so, enter the password and then press “y” to continue the installation.
When Git gets installed, you can check its verification with the following command in the screenshot.
$ git --version
Git can be configured by using the terminal or command-line window. It needs a username, that acts as a bind name and an email address.
Use the following command to set a username, swap the content inside the “Mahwish Aslam” with your name.
$ git config –global user.name “Mahwish Aslam”
Step 2:
Run this command to set an email address, swap the content inside the “Mahwish.aslam95@somedomain.tld” with your user email.
$ git config –global user.email Mahwish.aslam95@somedomain.tld
Given below command lists out the changes made to the Git configuration file as shown in the screenshot.
$ git config --list
If you want to edit the settings, they can be changed at any time by using the following command:
$ git config
Git is very easy to install on Ubuntu 20.04, you just need four commands to install and configure it. You just need an APT command to install the stable version from the Ubuntu repository.
Magento is a free and open-source e-commerce platform written in PHP. It is simple, easy…
ISPConfig is an open-source control panel that allows users to manage multiple servers from a…
As a Linux administrator, you may find it necessary to troubleshoot or test your Simple…
Ubuntu 24.04, like many modern Linux distributions, relies on the NetworkManager for managing network connections.…
Restic is a modern, open-source backup program designed for efficiency, security, and simplicity. It enables…
phpMyAdmin is a popular free tool written in PHP intended to administer MySQL and MariaDB…