How to Install Git on Ubuntu 15.04

Git is an open source, distributed version control system . It’s generally utilized for source code administration,In this article, we will demonstrate how to install Git on a Ubuntu server.

First login to your server as root.

Before installing anything new, just follow a simple best practice to make sure the list of available packages is up to date:

apt-get update

Then just run one command for installation via apt-get:

apt-get install git-core

You’ll be asked to confirm the download and installation; simply enter y to confirm. Once this command is complete, git will be installed and ready to use.

You can check the version of git that was installed by using the following command:

git --version

To prevent any errors, it’s a good way to setup your user for git. We’ll setup the user cppl with the e-mail address [email protected].

git config --global "cppl"
git config --global "[email protected]"

Next we can verify the configuration changes by viewing the .gitconfig.

cat .gitconfig

We can also view the same details of your configuration by using the following command:

git config --list