CS 240 Lab 1: Git & GitHub
Due Mon Sep 09 at 11:59pm
Overview
The purpose of this lab is to get you started with git and GitHub. Git is a version control system (used to organize source code when multiple people are working on it), and GitHub is a hosting service for organizing git-controlled projects. In this lab you will setup a GitHub account, work through an online tutorial, and then submit some changes to a class repository.
Objectives
- Install git and setup a Github account
- Learn the basics of using git
- Be able check out and submit changes to a git repository
Resources
- General
- GitHub
- GitHub Help (scroll down for full list of tutorials)
- Getting started tutorials
- Getting started with git A detailed getting started tutorial
- GitHub: Setting up git A more simple version of getting git up and running for use with GitHub
- Try Git An interactive tutorial for getting started (you'll be asked to complete this)
- Git - Simple Guide A "just the basics" explanation of how to do things in git. Doesn't explain what is going on, but will explain what commands to use!
- Learn Git Branching Another interactive tutorial--this one has more pictures of what is going on!
-
The GitHub GUI application
(Windows)
(Mac)
Note that there are other 3rd-party application for managing git repositories. If you find one you particularly like, be sure and share it with the class! - More background
- Git learning videos Short video explanations of the basics of git
- Almost off-topic: Hg Init This is a tutorial for a different (but similar) version control system called Mercurial. However, it is one of my favorite explanations of how version control systems work (even if some of the command names are slightly different)
- Git References
- Pro Git book A great, detailed discussion of all things git
- Git Reference A detailed discussion of most of the common git commands
- Git Branching Model A nice overview of how to use git branching to setup a project (we will be drawing from these ideas)
Let me know if you find other good references I should include!
Directions
- The first thing you'll need to do is register a github account (if you don't already have one). Go to github.com and select "Sign Up" (you can also register through the GUI applications, see the above tutorials).
-
Once you've registered an account, send the professor
an email
letting him know what your username is. That way he can add you to the class list in GitHub and give you access to the repositories.
- You should register a username that is similar to your UPS username--
'myusername_ups'
or'myusername_cs315'
would be ideal. This will make it easier for us to collaborate and for the professor to figure out who submitted what, rather than needing to figure out who 'LeetCoder2013' is.
If you already have a user account on github (whose username is not immediately identifiable as you), you should register a separate one just for the purposes of this class. - You should register a username that is similar to your UPS username--
-
While you're waiting for Joel to act on that (please be patient!), complete the tutorial at
http://try.github.com.
You should also look/work through other tutorials and resources listed above, to make sure you get a sense for how the system works.
- This is a chance to practice learning from online tutorials---a common practice when doing software development. Consider the differences between the tutorials. Which references make more sense? Which do you like more / find more helpful? Why?
- Once Joel confirms that you've been added to the class list in GitHub, log into GitHub and access the Lab 1 repository at https://github.com/UPS-CS240-F13/Lab1.
- Clone this repository to your local machine so that you have a local copy.
- Modify the file
list.txt
, adding yourself to it. Commit the change to your local repository. -
Add a new text file (that includes your name in the file name) that answers to the questions in the
240_survey.txt
file. Strong Recommendation: try to do this in a separate local branch, and then merge it into your master branch (see http://git-scm.com/book/en/Git-Branching for details).- Note that others will be able to read your submitted text file!
- Push your changes to the GitHub repository.
- Optional: enjoy a cold beverage of your choice. Because why not?
Grading
If you've added your name to the rollcall and uploaded your survey, you will receive full credit for this lab!