Git is one of the most popular tools used as a distributed version control system (VCS). Git is commonly used for source code management (SCM) and has become more used than old VCS systems like SVN. In this article, we’ll show you how to install Git on your Ubuntu 16.04 dedicated server.

Installing Git on Ubuntu 16.04 LTS

We have also created a convenient video tutorial that outlines how to install Git on a Ubuntu 16.04 Server.

Now, let’s get started on that install…

Preflight Check

  • You should be running a server with any VPS Ubuntu LTS release.
  • You will need to log in to SSH via the root user.

First, as always, we should start out by running general OS and package updates. On Ubuntu we’ll do this by running:

apt-get update

After you have run the general updates on the server you can get started with installing Git.

  1. Install Git

  2. apt-get install git-core

  3. You may be asked to confirm the download and installation; simply enter y to confirm. It’s that simple, Git should be installed and ready to use!

  4. Confirm Git the installation

  5. With the main installation done, first check to ensure the executable file is set up and accessible. The best way to do this is simply to run Git with the version command.

  6. git --version

  7. git version 2.7.4

  8. Configure Git’s settings (for the root user)

  9. It’s a good idea to setup your user for git now, to prevent any commit errors later. We’ll setup the user testuser with the e-mail address testuser@example.com.

  10. git config --global user.name "testuser" git config --global user.email "testuser@example.com"

Note:

It’s important to know that git configs work on a user by user basis. For example, if you have a ‘david’ Linux user and they will be working with git then David should run the same commands from his user account. By doing this the commits made by the ‘david’ Linux user will be done under his details in Git.

#distributed version control #git #linux #scm #source code management #tools #ubuntu #ubuntu 16.04 #vcs #version control #version control system

How To Install Git on Ubuntu 16.04 LTS
5.35 GEEK