jenkins the definitive guide

(Jeff_L) #1

2.2.2. Installing Git


Since we will be using Git, you will need to install and configure Git on your machine. If you are new
to Git, you might want to run through the basics on the Git Reference website^4. And if you get lost, the
whole process is well documented on the GitHub help pages^5.


First of all, you need to install Git on your machine. This involves downloading the appropriate installer
for your operating system from the Git website^6. There are packaged installers for both Windows and
Mac OS X. If you are using Linux, you are in Git’s home ground: most Linux distributions. On Ubuntu
or some other Debian-based distribution, you could run something like:


$ sudo apt-get install git-core

On Fedora or another RPM-based distribution, you could use yum instead:


$ sudo yum install git-core

And, being Linux, you also have the option of installing the application from source. There are
instructions on how to do this on the Git website.


Once you are done, check that Git is installed and available by invoking it from the command line:


$ git --version
git version 1.7.1

2.2.3. Setting Up a GitHub Account


Next, if you don’t already have one, you will need to create a GitHub account. This is easy and (for our
purposes, at least) free of charge, and all the cool kids have one. Go to the GitHub signup page^7 and
choose the “Create a free account” option. You will just need to provide a username, a password, and
your email address (see Figure 2.2, “Signing up for a GitHub account”).


(^4) http://gitref.org
(^5) http://help.github.com
(^6) http://git-scm.com
(^7) https://github.com/plans

Free download pdf