Git is a distributed version control system. It allows the non-linear development of Programming Projects and can handle large amounts of data effectively by storing it on the local server.
Git can be installed in two ways.
Installing Git with apt-get is quick and easy. The program installs on the virtual private server wit one command:
sudo apt-get install git
After it finishes downloading, Git will be installed and ready to use.
To obtain the most recent version of Git, install it from source.
Update apt-get to make sure that the most recent packages are downloaded:
sudo apt-get update
Prior to install Git itself, download all of the required dependencies:
sudo apt-get install libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev build-essential
Download the latest version of Git:
wget http://git-core.googlecode.com/files/git-1.8.1.2.tar.gz
Untar the archive and change the directory to it:
tar -zxf git-1.8.1.2.tar.gz
cd git-1.8.1.2
For a global install, install it once as yourself and once as root, using the sudo prefix:
make prefix=/usr/local all
sudo make prefix=/usr/local install
Git can be updated in future via Git itself:
git clone git://git.kernel.org/pub/scm/git/git.git
After Git is installed either from apt-get or from the source, it need to be configured with username and email in the gitconfig. This file can be be accessed at ~/.gitconfig
Opening right after Git installation whould reveal a bank file:
sudo nano ~/.gitconfig
Add the required information with the following commands:
git config --global user.name "NAME"
git config --global user.email "email@address.com"
All settings can be seen with this command:
git config --list
Comment on This Data Unit