Preparations

Installing git

Now that we understand what git is, and why we want to use it, we need to install it first.

If you haven't installed git yet, visit the download page and run the installer for your operating system. If you're using Cloud9, git should already be installed.

Before we continue, let's verify git is working. From the command line, run:

$ git --version

You should see something like git version 1.8.3.2.

Interacting With git

For the most part, we will be using the command line to interact with git repositories. There are also graphical user interface, or GUI, applications available for viewing and maintaining your repositories, which we will occasionally use to see a visual representation of the changes we have made.

The important thing to know is that a git GUI application is simply a layer between the user and git. All of the commands that the GUI issues are relayed to the underlying git command line application. That means anything you can do using a GUI, you can also do using the git command line application.

We highly recommend first getting familiar with git from its command line interface before jumping into a GUI tool.

Installing a GUI

Windows and Linux Users

If you are on Windows or Linux, you can use gitk or git-gui, which both come with the official git release package available at git-scm.com/download.

If not already installed, gitk can be installed with these commands:

$ sudo apt-get update 
$ sudo apt-get install gitk

To run gitk, type gitk in your command line or terminal. To run git-gui, type git gui instead. These commands need to be issued from an existing git repository, which we'll cover soon.

OSX Users

There are a variety of Git GUI clients For OS X (aka, macOS). Find out what's available by searching Google for git gui macOS. Note that you don't have to use a git GUI client; in fact, we recommend that you don't until you get comfortable with Git in general.