Git is a VCS (Version Control System) which is designed to handle the development and maintaining process of any given collaborative project. It allows developers and project managers to efficiently and easily overview the changes happening in the source of their program, and configure it as they desire. It is the most commonly used VCS in the world at the moment, especially for open source programs.
Fun Fact: Git is invented by no other than the creator of our favorite kernel – Linus Torvalds!
Git is available in the official repositories of most distributions – so of course, it’s available for Ubuntu. Thus, the installation part is pretty easy.
The only thing you need is an Ubuntu system (Desktop or Server), and sudo access or the root user.
These instructions work on any Ubuntu version, including 16.04, 18,04, 19.04, and even other Debian-based distros.
Install Git on Ubuntu
This is the process of installing Git on Ubuntu.
Log into your server or just open Terminal if you’re using a Desktop version.
First, update the system:
sudo apt-get update sudo apt-get upgrade -y
This isn’t necessary, but it is always good practice to update the system before installing any package. Now, if you want to install Git with its basic functionality, use this command:
sudo apt-get install git
If you want to install all available features that Git can provide, use this:
sudo apt-get install git-all
This installs all Git packages, and so, all the features you could possibly need. This will take a while, as the packages are pretty big, considering you are installing all the files.
That’s it. You just installed Git on Ubuntu.
Confirm That Git is Installed
Now confirm the installation using the following command:
Sample output: git version 2.17.1
The output will, of course, differ depending on what version of Git you’ve installed.
Sign up at Vultr and start using Git on your Ubuntu server.
Conclusion and Further Reading
That’s all for the installation of Git. If you want a reference for its usage, visit this link on the official website. Let us know about any questions in the comments section.
If you’re looking for a GitHub alternative, this might help.