Linux Resources:
  • Download Ubuntu:
    • Instructions for making a bootable USB version or CD are included on this download page.
    • Underneath the large orange download button is a link that says "Direct link for this download", use that one.
  • Download wubi:
    • Wubi is windows only installer that will allow you to run ubuntu alongside your current windows installation
  • You can use any ssh client to log into the class computers. Addresses in 307 are: where xx is the computer number. (For example or
Mac Resources:
  • Mac OSX is built off of a linux style base system (BSD Unix), which makes compiling and running source for linux programs easier on the mac without having to install Ubuntu. Note that there are some differences between the OSX system libraries and the linux ones. Usually, the OSX compiler is less forgiving the the Ubuntu one. 
  • Apple Developer Tools (Xcode)
    • If you have OSX version 10.6 or later, you should be able to use the Mac App Store to find "Xcode" and install it for free.
    • If you have an earlier version of the Mac OS, or have difficulty with the App Store, you can download an older (but fully functional) version of the developer tools here (for OS 10.6 - Snow Leopard) or here (for OS 10.5 - Leopard)
    • You may need to sign up for an apple developer account to use the link above, it's free and you can do so here:
    • You will need to install the command line tools after Xcode installs, this is easy, just open a terminal and enter:
      • $ xcode-select --install
        This will start the installation process
  • Download x11, the linux style windowing environment
    • This used to be included in the macos, before you install check to see if your computer has a program called x11
    • If it doesn't, download and install x11 from here:
  • Download Homebrew:
    • Homebrew allows you to install linux style applications via the Mac OS terminal application, it is not necessary, but can be very useful. You must have the Apple Developer Tools installed in order to use Homebrew.
    • If you want to install emacs from homebrew (which is highly recommended), you'll want to install it with the windowed version, to do so, include the --with-x11 flag:
      • $ brew install emacs --with-x11
    • MacPorts  ( and Fink ( do the same thing as homebrew, but homebrew is probably more current and there are other pluses to it over the other two. That being said, there are times when a package you want may only be available from one of these options. You don't need to install these unless you want to play around with things, it may cause issues with homebrew.
Windows resources:

Github Submodule Setup
  • If you need a refresher on using git in general, see "The Basics" section below.
Think of a submodule as a github repo inside another github repo (I know, woah).  Here's how things will generally be set up:
  1. Each class will have a repo for assignments.
  2. Each student/group will create a totally separate repo for their work
    • This should not live in the main work repo
  3. Each student/group will clone the main work repo, and then link their own repo as a submodule
  4. Each student/group will get rid of their local copy of the main repo
  5. Each student/group will work on their assignment in the repo created in step 2
Ok, but what about more instructions with examples you say?

2. Create & clone your own repo
Do all your work in this repo.
$ git clone
Cloning into 'work-test'...
remote: Counting objects: 3, done.
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (3/3), done.
Checking connectivity... done.

3. Clone the main repo
$ git clone
Cloning into 'euler'...
remote: Counting objects: 14, done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 14 (delta 5), reused 9 (delta 3), pack-reused 0
Unpacking objects: 100% (14/14), done.
Checking connectivity... done.

Change into the correct directory and add your repo as a submodule
$ cd euler/
socrates: euler dw$ cd 04/
socrates: euler/04 dw$ git submodule add dyrland-weaverJon
Cloning into '04/dyrland-weaverJon'...
remote: Counting objects: 3, done.
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (3/3), done.
Checking connectivity... done.
Please note, submodule adding is done by: git submodule add <URL TO YOUR REPOSITORY> <required submodule directory name>

Commit and push changes
$ git pull
Already up-to-date.
socrates:~/Desktop/git_demo/euler/04 dw$ git commit -a -m "added dw submodule"
[master f25eeda] added dw submodule
 2 files changed, 4 insertions(+)
 create mode 100644 .gitmodules
 create mode 160000 randomizer/6/jonalf_dw
socrates:~/Desktop/git_demo/euler/04 dw$ git push
Counting objects: 5, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 626 bytes | 0 bytes/s, done.
Total 5 (delta 0), reused 0 (delta 0)
   11dc0c6..f25eeda  master -> master
You do not have to pull first, but it is a good idea in case anyone has pushed before you have a chance to.

Remove the main repo and go about your business
$ cd ../../
$ rm -rf euler/

Using Git/Github: The basics

Cloning an existing project:
  For every assignment, you will need to clone the project repository You should only do this once per repository per computer. After you clone, the project directory will be downloaded onto your computer and all future git changes must be made inside that directory.

    use the following command to checkout:
$ git clone<assignment name>.git
Cloning into 'hw1'...
remote: Counting objects: 4, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 4 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (4/4), done.

    for example, to checkout an assignment called hw1 I would do the following:
$ git clone
Cloning into 'hw1'...
remote: Counting objects: 4, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 4 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (4/4), done.

This will create a folder on your computer called (in this case) hw1. You must go into that folder to add your own directory.

Creating your own directory within a project:
    Once you have cloned the assignment, create a directory for yourself. Change into the assignment folder and make a new directory with the name: Firstname_Lastname. So mine would be JonAlf_Dyrland-Weaver. After you create the directory add it to the main repository and commit (see the instructions for adding and committing below)
    So to make my own repository to the project called hw1 from above:
$ cd hw1
$ mkdir JonAlf_Dyrland-Weaver
$ cd JonAlf_Dyrland-Weaver
    Once you make, add and commit the directory do all your work within the directory

Adding files:
    When you create a new file, it is not automatically tracked by git. You must tell git which files it should track. (This is useful because you don't want to add .o, ~ and executable files that may get created while working on your project, you may also look at .gitignore for more ways to keep out unwanted files). You only need to do this once per file. After it has been added git will track it. You cannot add an empty folder. Make sure you put something in a folder in order to add the whole thing
$ git add file.txt 
    You will not see any response after adding a file
Removing files:
$ git rm file.txt
rm 'JonAlf_Dyrland-Weaver/file.txt'
    Running git rm will also remove the file from your directory immediately

Committing your changes:
    When you add files, the changes are not automatically saved but git, you must commit these changes. You must always use the -m option followed by a string containing a commit message. You should commit anytime you have changes that are worth saving!
$ git commit -a -m "adding an initial file"
[master 5524096] adding an initial file
 0 files changed
 create mode 100644 JonAlf_Dyrland-Weaver/file.txt
    The -a option will automatically commit any changes to files that you have already added. You should always include -a (unless you know what you're in for)

Pushing your changes to gihub
    Committing is a local operation, it will not change the status of your work on gihub. You do this with the push command. When pushing, git may ask you for your username and password, (use your github account information) depending on how you have git set up.
$ git push
Username for '': jonalf
Password for '': 
   8bd554d..5524096  master -> master

Updating your project to the latest version:
    When you start working in a new location (i.e. you worked in school, pushed your changes and now want to work at home with the latest version), pull any changes from github. This will make all of your files match with those on github.
$ git pull