Git installs as a normal package on Ubuntu:
sudo apt-get install git |
Configuring Git user is an optional step:
git config --global user.email "you@example.com" git config --global user.name "Your Name" |
Type the following command to create an empty repository wherever your code is:
cd ~ git init |