I recommend the Git SCM tutorial, found at http://git-scm.com/book
On the github page for the repository, click on the green Clone or download button.
You need to use "Clone with SSH." If the box reads "Clone with HTTPS", click "Use SSH."
If that is not available, set up your SSH key.
Click the copy button next to the link.
To clone your repository into the directory, use
git clone <link>
To update the repository with any changes made, for instance by staff or other members of a group project, use
git pull
It is a good idea to use git pull every time you start working, just in case.
When you are ready to commit your changes, use
git commit -a
If you want to avoid writing the message in vim, you can specify the message on the command line iwth
git commit -a -m "A helpful message with no punctuation"
When the coded is in a good state, such that it compiles, it's a good idea to push your changes back to Github. Use:
git push
This uploads all changes to the git server. Since course staff gets your code from the server, this how you will submit your projects.
Make sure that you push!
If you don't want to commit changes to every file, or you want to add a new file, use
git add <filename>
git commit -m "message"
It is okay to have untracked files.
You should never add generated files, such as executable or object files, to your repository.
Never use git add *
If you make a mistake and want to roll back any changes you have made, you can use
git stash
To check the current status of the repository, use
git status