Install git ubuntu 12.04

My Short note of installing git 1.8 in ubuntu 12.04

sudo apt-get install git
sudo apt-get update
sudo apt-get install libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev build-essential

wget https://git-core.googlecode.com/files/git-1.8.1.2.tar.gz

tar -zxf git-1.8.1.2.tar.gz

cd git-1.8.1.2

make prefix=/usr/local all

sudo make prefix=/usr/local install

git config --global user.name "NewUser"
git config --global user.email newuser@example.com

CREATING REPOSITORY
mkdir ride.git

cd ride.git

git init --bare

LOCAL
if on server
git clone /home/user/repos/ride.git ./
if on local