Git and Github

In this course, we will use Github as our version control and repository system.

Git is a version control system. With git, you keep a master copy of your project on the github server, plus you can keep a copy on each computer that you use to work on the project. (For example, I have a master copy of these web pages on the server, plus a copy on each of the three computers that I typically work on). If you are working on a pair project, you might keep one copy on each partner's machine.

A general introduction to git can be found here. A video demonstration of git and github can be found here.

Your daily workflow with git looks as follows:

There's more, but that's the basic idea.

When you see documentation about Git, you will see lots of stuff about branches, merges, indexes, etc., etc. Don't worry about any of that. If you know about branches and want to use them as part of your workflow, feel free to do so; just submit your assignments in the branch master.

A useful tip: as soon as you get one piece of your task working, commit it. (You don't have to sync it until later). That way, if you screw things up on the next set of changes, you can always undo your bad work by clicking on "revert commit" (not "rollback", unless you know what you are doing). Reverting will get you back to the exact same state you were in when things were working, and you can try again.

Git (and other version control systems) become even more valuable when there are many people working on a project, perhaps from many different places. In a company setting, this is vital, and there are often restrictions on who can check files into the master copy of a project. Luckily we don't have to worry about these complications.

You may eventually have to deal with the situation in which you and your partner have committed incompatible changes to the server. A discussion of this situation and what to do about it may be found here.

There are lots and lots of tutorial materials on git and github. Find your favorite on the internet. If you find some that are particularly good, please share them with the class by posting links on Piazza.

Local Details


Last modified: Tue Aug 27 22:32:15 -0400 2013