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

Git

In this course we will use Git and Github for collaboration, version control, and homework submission. 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.com/

Follow the “Sign up for free” instructions. Please use your CCIS email address when you register (this important for getting you a free account with perks that we will need for the course). If possible, we suggest re-using your CCIS username as your Github username.

After you’ve created a github account, you will need to join the “CCIS-2510H” 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/

Both the Github client and TortoisGit are avaialable on CCIS lab machines.

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.

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.

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.com. Be switch to switch your account context to CCIS-2510H. Create a new repository. The name of repository should be sp14pairNN 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.

Within your repository you should follow the following naming conventions and directory structure:

sp14pairNN/

  assign01/

  assign02/

  ...

Feel free to also add other directories for labs, notes, or whatever else you find useful, but assignments must be in their own directories, named as above.

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.