Reading Time: 1 minute
What is the purpose of Git?
Git gives you a way to not only track changes in source code, but it can also be used to track changes in files. It then stores the data in what is called a repository, also known as a repo.
In short, Git is a tool used as a version control system (VCS), allowing you to distribute changes from your local machine to the repo and vice versa. In this tutorial, we’ll be instructing on how to install and configure git onto an Ubuntu 18.04 server.
Install Git on Ubuntu 18.04
Step 1: Update our System
This step ensures that general updates are performed on the server.
Step 2: Install Git
Install Git with the command below and proceed through the installation with y,
apt-get install git-core
Step 3: Confirm Git Installation
We will be able to tell if the installation was successful by running the following command:
Configuring Git per User in Ubuntu 18.04
After installing Git, configurations are needed to commit messages to be sent out. Without setting the name and email address, you’ll see warnings when making commitments to git. If you have multiple users who utilize git, create an entry for each user. You can easily set these details for a user with two commands:
git config --global user.name "Your_Name"
git config --global user.email "firstname.lastname@example.org"
If you already have a github.com account you can use the associated username and email.
If you need to access the information set, you can find it in the .gitconfig
Thanks for reading our introductory article on How to Install Git. Continue your education by reading our other Git related articles, Creating a Repo in Github and Committing/Pushing to Git.