Installing Git on Ubuntu Linux

Previous posts:
- Linux (Ubuntu) Virtual Machine on Windows Azure
- Remote Access to Ubuntu Linux VM on Windows Azure
- Installing LAMP on Ubuntu

I’ve been writing some posts about setting up a development environment for Ubuntu running on Windows Azure. Here’s the short post on getting Git source control working.

Install Git

Installing LAMP is easy, there isn’t a word for how easy it is to install Git. It’s one command and you’re done. Done with the install that is… you’ll need to do a little config and then clone a repository or initialize one.

$ sudo apt-get install git

image

Once you’ve got your install done, you can quickly configure your user settings with these commands.
$ git config --global user.name NewUser
$ git config --global user.email

Check your Git install

Where is Git installed?

$ which git

What’s your config?

$ git config –list

Start Using Git by Cloning a Repository

Clone your repository to a directory (for example, from GitHub):
$ git clone git@github.com:whatever folderName
Note that you don’t have to pay for a private repository. See my post on a Free Private Git Repository Using TFS Online Git Integration. (Need help? See Cloning a Git Repository.)
Also, if you’re new to Git, keep in mind that you can get the Pro Git book for free.