On this page:
Purpose
Register a Github account
Get Git
Git With Eclipse
Your Github repositories
Important git concepts
6.0.0.1

Git

In this course we will use Git and Github for collaboration, version control, and homework submission. Git, along with other version control tools, are widely used in the software industry. This guide will show you everything you’ll need to use git in this course

Purpose

Git is a version control system that keeps versions of your files in a “repository”, which we will provide for you using the Github hosting service. The repository will enable you to retrieve (“clone”, “pull”), locally save (“commit”), and share (“push”) your files from multiple locations, and it will enable us to easily access your code for grading. It also provides a backup mechanism for you in case you ever need to revert to older versions of your code.

Register a Github account

The first thing you will need is a Github account. To do this, go to:

http://github.iu.edu/

Follow the registration instructions.

After you’ve registered, you will need to join the “p532-13” organization. To do that, you should communicate your github username to the course staff so they can add you to the organization.

Get Git

Github provides clients for both Windows and Macs at the following URLs:

An alternative git client is TortoiseGit:

http://code.google.com/p/tortoisegit/

You’re welcome to use whatever git client that suits your needs. The course staff prefers using the git command line program. Examples of using the command line are given below.

Git With Eclipse

The git plugin for Eclipse is "Egit".

Install the EGit plugin for Eclipse:
Easiest way is to search for "EGit" in Help->Eclipse Marketplace...

Your Github repositories

You will use git to (1) keep track of revisions as you work on your assignments, and (2) submit your assignments for grading. You will also use the github bug tracker to manage issues.

Each pair will form a team, and each team will create a repository for their work. Within this repository will be a directory for each assignment.

In order to set up a team, you will have to communicate the team members to a member of the course staff so they can create the team for you.

Once your team is established, you can create a repository for your work. All homework should be done in private repositories, so make sure to create a private repository.

To create your pair’s repository, log in to github.iu.edu. Be switch to switch your account context to p532-13. Create a new repository. The name of repository should be pairNN where NN is your two-digit pair number. The repository should be marked private. Since we’ve already created teams, your partner should immediately have access to this repository. At this point, you need to clone the repository to your computer and can start working.

Important git concepts

There are a few important git concepts you need to be comfortable with. To begin with, there are “repositories”. At first cut, a repository is just a bundle of files that have a history of modifcations. When you created your pair repository, you made an empty bundle with no history. That repository lives on github. In order to make changes, you will need to bring that repository to your local computer, make changes, commit them, and then communicate those commits back to github.com.

There are a couple things that you want to make sure you do.