Reading Time: 1 minutes

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.

apt-get update

 

Step 2: Install Git

Install Git with the command below and proceed through the installation with y, when prompted.

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:

git --version

 

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 "email_address@domain.com"

Note:
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 file.

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.

Avatar for Echo Diaz

About the Author: Echo Diaz

Throughout Echo's four year stint as a technical support specialist, her passion for breaking down complex concepts had to lead to a career in professional writing. As a former top tier support specialist, she added a distinctive element to her written work that spoke to customer feedback and concerns. Echo occasionally pops her head out from behind her computer to watch her dog energetically run around the yard and unabashedly shovels money into buying tickets to see her favorite musical artists.

Latest Articles

Blocking IP or whitelisting IP addresses with UFW

Read Article

CentOS Linux 7 end of life migrations

Read Article

Use ChatGPT to diagnose and resolve server issues

Read Article

What is SDDC VMware?

Read Article

Best authentication practices for email senders

Read Article