Using Git from university Unix machines: corn, myth, etc.

Written by Aditya Acharya

In keeping with the class's goal to expose you to some new technologies, we have decided that Git, not Subversion, will be the source control mechanism used. One big advantage of Git over Subversion is that it provides each user with a local copy of the repository. So, there will now be 2 repositories to keep in mind as you develop: your local repository and the class repository. As you develop, you can commit and revert freely with your local repository, and have no worries about conflicts. When you're satisfied with what you have done, then you can push your code to the class repository. This prevents unnecessary commits to the class repository just for the sake of having a revision to revert to. For a more in depth discussion of Git, see Wikipedia.

These instructions are only for university Unix machines, such as myth, corn, etc. If you want to use gir from computer clusters (Mac or PC), let us know and we'll put up instructions on how to do it.

Step 1: ssh into the machine: ssh <your SUNetID>@myth.stanford.edu

Step 2: Navigate to the folder where you want to pull the latest version of the class repository to. The repository will be pulled down as a self-contained folder.

Step 3: To pull down the latest version of the class repository, run this command:

There are lots of git tutorials. Here are a few to get the hang of Git with:
http://www-cs-students.stanford.edu/~blynn/gitmagic/
http://www.kernel.org/pub/software/scm/git/docs/gittutorial.html
http://www.sourcemage.org/Git_Guide

The text-editor that git uses for comments, etc., is vi. You can find a vi guide here:
http://www.cs.colostate.edu/helpdocs/vi.html

Acknowledgements:

The Windows git setup instructions are courtesy of Kyle Cordes:
http://kylecordes.com/2008/04/30/git-windows-go/.

I found the instructions for "Step 2: Entering user info into Git" at
http://www.kernel.org/pub/software/scm/git/docs/gittutorial.html.